]> git.sesse.net Git - vlc/commitdiff
* mpga_audio: should fix an infinite loop when miss-detected free
authorLaurent Aimar <fenrir@videolan.org>
Sun, 4 May 2003 10:46:28 +0000 (10:46 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 4 May 2003 10:46:28 +0000 (10:46 +0000)
bitrate stream.

modules/codec/mpeg_audio.c

index 5d254fc45f6a02a4e77710d8bccd54d660ae0640..7966d7c0d1c379972231becd66d770a99e034529 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_audio.c: parse MPEG audio sync info and packetize the stream
  *****************************************************************************
  * Copyright (C) 2001-2003 VideoLAN
- * $Id: mpeg_audio.c,v 1.14 2003/03/31 22:39:28 massiot Exp $
+ * $Id: mpeg_audio.c,v 1.15 2003/05/04 10:46:28 fenrir Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Eric Petit <titer@videolan.org>
@@ -357,6 +357,9 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
                      i_next_layer != i_new_layer )
                 {
                     /* This is an emulated start code, try again. */
+                    /* there is at least 1 byte free */
+                    ((uint8_t *)p_buffer->p_buffer)[i++] =
+                                GetBits( &p_dec->bit_stream, 8 );
                     continue;
                 }
                 i_free_frame_size = i;