GNOME Bugzilla – Bug 636886
baseaudiosink: no running clock when eos leads to hang in PLAYING
Last modified: 2011-03-04 13:14:12 UTC
Created attachment 176136 [details] Test clip to reproduce In particular, that can make things hang when pause/playing when audiosink reached EOS. For example, consider a mov clip with 8s of audio and 10s of video (evidently, the difference can also be more or less). If playback is paused after audiosink receives and renders eos, then the ringbuffer is not started upon playing. As such, there is no advancing clock, and rendering of video will wait indefinitely. Although gst_base_audio_sink_drain tempers this in general (by delaying eos rendering), it need not handle all cases. In particular, due to the edit list / segment handling in qtdemux, it may send "unequal segments" to audio and video branches (as opposed to other demuxers, where it is usually the same plain segment). Not quite sure how to fix. As the audiosink claims to provide a clock, it should presumably arrange for a running one, e.g. if it has ever seen some data and/or eos. Or alternatively should not claim to provide a clock when it won't be coming up with a running one. Attached test clip has characteristics as decribed above and can be used to reproduce (e.g. using the test app in bug #633700).
Some time ago I changed baseaudiosink (or was it basesink) to only provide the audio clock in PAUSED/PLAYING and to notify about it not working when going back to READY. IIRC Wim reverted these changes because of performance reasons... but would they help here?
Having a really running/advancing clock in PLAYING should handle this (so whatever helps to arrange that ...)
Created attachment 182387 [details] [review] baseaudiosink: start ringbuffer upon going to PLAYING and already EOS Appears to fix it and also make sense ...
Created attachment 182454 [details] [review] baseaudiosink: start ringbuffer upon going to PLAYING and already EOS Next version, eliminate some obsoleted stuff as well.
commit ba2e500bd992d8ad7db0da923801964964835967 Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Thu Mar 3 19:14:38 2011 +0100 baseaudiosink: start ringbuffer upon going to PLAYING and already EOS ... otherwise we may end up without running clock in PLAYING. Fixes #636886.