diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-04-20 18:31:03 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-04-20 18:31:03 +0000 |
commit | 2d46a96efe82d911a106c316d6d11ac9a64cd9e0 (patch) | |
tree | d3c457ba38286e87e863ccb59eb575b2ab0ac0b5 /src/liba52/xine_decoder.c | |
parent | ccf0b324f336d93fcd6368ab2bda3d470adbbb99 (diff) | |
download | xine-lib-2d46a96efe82d911a106c316d6d11ac9a64cd9e0.tar.gz xine-lib-2d46a96efe82d911a106c316d6d11ac9a64cd9e0.tar.bz2 |
fix several audio buffer leaks
CVS patchset: 1748
CVS date: 2002/04/20 18:31:03
Diffstat (limited to 'src/liba52/xine_decoder.c')
-rw-r--r-- | src/liba52/xine_decoder.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/liba52/xine_decoder.c b/src/liba52/xine_decoder.c index 484001a15..017423a78 100644 --- a/src/liba52/xine_decoder.c +++ b/src/liba52/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.22 2002/04/09 03:38:00 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.23 2002/04/20 18:31:03 miguelfreitas Exp $ * * stuff needed to turn liba52 into a xine decoder plugin */ @@ -331,11 +331,13 @@ static void a52dec_decode_frame (a52dec_decoder_t *this, int64_t pts) { buf = this->audio_out->get_buffer (this->audio_out); int_samples = buf->mem; + buf->num_frames = 256*6; for (i = 0; i < 6; i++) { if (a52_block (&this->a52_state, this->samples)) { printf ("liba52: a52_block error\n"); - return; + buf->num_frames = 0; + break; } switch (output_mode) { @@ -374,7 +376,6 @@ static void a52dec_decode_frame (a52dec_decoder_t *this, int64_t pts) { /* output decoded samples */ - buf->num_frames = 256*6; buf->vpts = pts; this->audio_out->put_buffer (this->audio_out, buf); |