[MPlayer-advusers] segfault on jpeg image

Reimar Doeffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Fri Jan 19 11:02:07 CET 2007


Hello,
On Fri, Jan 19, 2007 at 07:32:50AM +0300, Andrew Savchenko wrote:
> On 17 Jan 2007 22:38 Andrew Savchenko wrote:
> > On 17 Jan 2007 21:58 Attila Kinali wrote:
> > > A friend just told me that he could segfault MPlayer
> > > by using http://dod.vgmix.com/past/dec06/chrono.jpg
> > > as input:
> >
> > On further investigation it seems that mplayer crashes while
> > trying to display any jpeg or png image.
> 
> I've spend all night with gdb, but... I can't understood how that 
> code _must_ work, despite I really tryed to do this; though, it is 
> highly undocumented...

Um, sorry, maybe I should have said that I sent a patch to ffmpeg-devel
that fixes it.

> The only thing I can say, the reason of fault is unitialized 
> h->priv_data structure in mp_seek(...), demux_lavf.c:122.
> Lower in the code there is an attempt to dereference this NULL 
> pointer (stream->end_pos, line 129) which obviously results in 
> segfault. I have no idea how and where this structure should be 
> initialized.

It is initialized after url_fopen in demux_lavf. Unfortunately,
currently libavformat also probes demuxers that do url_fopen themselves,
which is not correct. It is the URLContexts opened from within the
demuxers that are not correctly initialized.

> I made regression test and failed to find revision where this 
> feature works properly. In older revisions mplayer doesn't crashes 
> but also doesn't display jpeg/png image, because "end of file is 
> reached" (gdb shows that file format is simply not recognized in 
> this case).
> 
> By the way, was there happy times when single jpeg/png pictures 
> were successfully displayed by mplayer?

With mf:// yes, without no (AFAIK).

Greetings,
Reimar Döffinger



More information about the MPlayer-advusers mailing list