[MPlayer-cvslog] CVS: main/libmpdemux demux_mpg.c,1.73,1.74

Guillaume POIRIER poirierg at gmail.com
Wed Mar 8 16:37:15 CET 2006


Hi,

On 3/8/06, Reimar Döffinger CVS <syncmail at mplayerhq.hu> wrote:
> CVS change done by Reimar Döffinger CVS
>
> Update of /cvsroot/mplayer/main/libmpdemux
> In directory mail:/var2/tmp/cvs-serv5592
>
> Modified Files:
>         demux_mpg.c
> Log Message:
> Missing free_demux_packet after read error
>
>
> Index: demux_mpg.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mpg.c,v
> retrieving revision 1.73
> retrieving revision 1.74
> diff -u -r1.73 -r1.74
> --- demux_mpg.c 27 Feb 2006 21:13:17 -0000      1.73
> +++ demux_mpg.c 8 Mar 2006 15:21:12 -0000       1.74
> @@ -559,7 +559,10 @@
>    pack = new_demux_packet(STREAM_BUFFER_SIZE);
>    len = stream_read(demux->stream, pack->buffer, STREAM_BUFFER_SIZE);
>    if (len <= 0)
> +  {
> +    free_demux_packet(pack);
>      return 0;
> +  }
>    {
>      register uint32_t state = (uint32_t)demux->priv;
>      register int pos = -len;

Correct me if I'm wrong, but aren't the lines:

>    {
>      register uint32_t state = (uint32_t)demux->priv;
>      register int pos = -len;

and the lines afterwards are dead code because of the "return" you
added? Shouldn't they be removed?

Guillaume
--
Reinventing the wheel certainly is annoying, but as long as all other
wheels are square...

Reimar Döffinger




More information about the MPlayer-cvslog mailing list