After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 585257 - [ffdec] drops buffers when caps change
[ffdec] drops buffers when caps change
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other All
: Normal normal
: 0.10.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-06-09 14:38 UTC by Arnout Vandecappelle
Modified: 2009-07-31 11:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Drain the decoder when caps change (1.22 KB, patch)
2009-06-09 14:41 UTC, Arnout Vandecappelle
committed Details | Review

Description Arnout Vandecappelle 2009-06-09 14:38:15 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.
Comment 1 Arnout Vandecappelle 2009-06-09 14:41:11 UTC
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?
Comment 2 Wim Taymans 2009-06-16 17:31:13 UTC
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.
Comment 3 Edward Hervey 2009-07-31 11:33:20 UTC
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