[MPlayer-dev-eng] [PATCH] fix for segmentation fault in libmpdemux/demux_ts.c
Nico Sabbi
nsabbi at email.it
Wed Apr 5 20:51:07 CEST 2006
Erik Auerswald wrote:
>Hi,
>
>when looking for an audio stream in an MPEG TS file an error occurs
>if a stream of type AUDIO_A52 is found but no audio stream matches the
>given parameters (e.g. "-alang foo" given on the command line). Since
>an audio type has been set the demuxer thinks that pid -1 is a valid
>audio stream which results in a segmentation fault when trying to open
>it. The attached patch fixes this.
>
>This problem occurs e.g. when setting "alang" in the config file to the
>preferred DVD audio language specifier which does not match the MPEG
>TS specifier (e.g. "en" vs. "eng").
>
>Regards,
>Erik
>
>
>------------------------------------------------------------------------
>
>Index: libmpdemux/demux_ts.c
>===================================================================
>RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ts.c,v
>retrieving revision 1.47
>diff -u -r1.47 demux_ts.c
>--- libmpdemux/demux_ts.c 11 Mar 2006 23:26:02 -0000 1.47
>+++ libmpdemux/demux_ts.c 5 Apr 2006 17:55:24 -0000
>@@ -578,6 +578,7 @@
> if(a52_check(pptr->buf, pptr->pos) > 2)
> {
> param->atype = AUDIO_A52;
>+ param->apid = es.pid;
> es.type = AUDIO_A52;
> }
> }
>
>
>------------------------------------------------------------------------
>
>
>
committed, thanks
More information about the MPlayer-dev-eng
mailing list