GNOME Bugzilla – Bug 585257
[ffdec] drops buffers when caps change
Last modified: 2009-07-31 11:33:20 UTC
When the caps on an ffdec change (setcaps function is called), the existing decoder is closed. This discards any buffers that are still retained in the decoder. The decoder should be drained, just as when a newsegment arrives. Patch follows.
Created attachment 136213 [details] [review] Drain the decoder when caps change Decoder should be drained if it was active. I assume this is indicated by the 'opened' flag. I'm not sure about the locking... Could the setcaps function be called again during the time that the lock is released?
no, the setcaps is called with the STREAM_LOCK, just like all other places where the _drain function is called so this should be fine and racefree.
Looks like it already was committed :) commit 0192717045efda4443473ab6b6973b8c1e7339b3 Author: Arnout Vandecappelle <arnout@mind.be> Date: Tue Jun 9 16:34:04 2009 +0200 ffmpegdec: don't drop buffers when caps change. Fixes #585257