[MPlayer-dev-eng] [PATCH] don't quit playing audio if video stream ends

Nico Sabbi nicola_sabbi at fastwebnet.it
Sat Aug 5 16:42:27 CEST 2006


Uoti Urpala wrote:

>On Sat, 2006-08-05 at 12:47 +0200, Nico Sabbi wrote:
>  
>
>>Currently, when the video stream ends mplayer quits
>>even if there is still some remaining audio data to play.
>>The patch attached fixes this bug permitting mplayer to keep on
>>playing audio until the end.
>>    
>>
>
>IMO it'd be better if video wasn't closed when the video part of stream
>ends, so that you could still seek back and see video. I think this
>patch would cause ugly failures when seeking back to a part which still
>has video ("too many video packets in buffer" error messages I'd guess,
>haven't tested).
>  
>

this last problem will be fixed by the attached patch (no more
buffered demux_packets) although seeking to the beginning
of the file won't show past video

>Just not updating the video if it's currently past the end should be
>easy enough, though doing it simply would mean that the OSD would not be
>updated either during the audio-only part. This is also related to a
>feature I've sometimes wanted myself, ability to NOT quit when hitting
>end of file (either playing or accidentally seeking past end of it) so
>you could just seek back. Main open question is whether there's any
>demuxer which would break if you fall off the end of the file and then
>seek back.
>
>There could also be demuxing-related problems with files where one
>stream ends. MPlayer tries to keep both audio and video buffered, and I
>think it'd currently end up trying to buffer the whole remaining part of
>the other stream while searching for more frames in the ending stream.
>
>  
>

for the future I have in mind to make the video stream re-initializable
and interchangable as the audio streams are now;
in the meantime the attached patch should be a good temporary
solution (in particular, wrt the present code it's still an improvement
and it doesn't break anything).

What do you think?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: veof3.diff
Type: text/x-patch
Size: 924 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060805/1cacedb8/attachment.bin>


More information about the MPlayer-dev-eng mailing list