[MPlayer-dev-eng] Fix when seeking in mpegts using -demuxer lavf

Etienne Buira etienne.buira at free.fr
Thu Aug 4 22:25:15 CEST 2011


On Thu, Aug 04, 2011 at 10:11:34PM +0200, Reimar Döffinger wrote:
> On Thu, Aug 04, 2011 at 09:36:16PM +0200, Etienne Buira wrote:
> > Ran into this when playing a mpegts file with -demuxer lavf, r33952 with
> > ffmpeg 1816addc.
> > 
> > A:47387.359 V:47387.615 A-V: -0.255 ct: -0.184   0/  0  6%  0%  0.5% 1 0 
> > Program received signal SIGSEGV, Segmentation fault.
> > mp_msp_av_log_callback (ptr=0x16b8ab0, level=24, fmt=0xca1d29 "Continuity Check Failed\n", vl=0x7fffffffb590) at libmpcodecs/vd_ffmpeg.c:201
> 
> A backtrace would be useful since this might be a bad av_log call in
> FFmpeg.

Can't conveniently make a gdb bt right now. But the call for sure is
coming from libavformat/mpegts.c:handle_packet(), which has been
modified in 50815142 (unrelated) from av_log(NULL, ...) to av_log(ts,
...).

> > Attached patch fixes that.
> 
> > Index: libmpcodecs/vd_ffmpeg.c
> > ===================================================================
> > --- libmpcodecs/vd_ffmpeg.c	(revision 33952)
> > +++ libmpcodecs/vd_ffmpeg.c	(working copy)
> > @@ -197,7 +197,7 @@
> >      default          :  mp_level= level > AV_LOG_DEBUG ? MSGL_DBG2 : MSGL_ERR; break;
> >      }
> >  
> > -    if(ptr){
> > +    if(ptr && avc){
> 
> What's the point of checking ptr?
> Even taking future changes into account I can't see how it should
> be possible to have a AVClass without having a ptr.

Right, pointless check.


More information about the MPlayer-dev-eng mailing list