[MPlayer-dev-eng] Re: [PATCH] avoid null dereference crash when -edlout w/o vid

Uoti Urpala uoti.urpala at pp1.inet.fi
Wed May 3 04:13:23 CEST 2006


On Tue, 2006-05-02 at 21:57 -0400, Robert Henney wrote:
> > Try:
> > 
> > float v = sh_video ? sh_video->pts : sh_audio->pts;
> 
> new patch attached that finds the audio pts via the method I found
> elsewhere in mplayer.c, and seems to work for me.  

Whether sh_audio->pts is set at all depends on which audio decoder
you're using (those for which I added support for a new kind of pts
tracking will set it, others won't). d_audio->pts will contain the pts
of the beginning of the last audio packet read by the decoder, EXCEPT in
the audio-only case. Audio-only inconsistently uses the sh_audio->delay
field instead. This also breaks current time display when you use
-novideo with demuxers that normally have video tracks, since the
audio-only case expects the different behaviour of the audio-only
demuxers...

It's basically a mess, I intend to clean it up soon. I thought I'd wait
until after the next release, but given the broken behaviour with
-novideo (which I didn't consider before) maybe it's worth changing
before release already. After the cleanup there will probably be a
function to call to get the pts of current audio output.




More information about the MPlayer-dev-eng mailing list