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 665566 - [0.11] ffmpegdec reopens the decoder every time it receives GST_EVENT_CAPS
[0.11] ffmpegdec reopens the decoder every time it receives GST_EVENT_CAPS
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
0.11.x
Other Mac OS
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-12-05 02:09 UTC by Matej Knopp
Modified: 2012-02-20 15:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Path to only reopen the decoder when new caps are different (2.42 KB, patch)
2011-12-05 02:09 UTC, Matej Knopp
none Details | Review
Only reopen decoder when new caps are different (2.15 KB, patch)
2011-12-11 05:27 UTC, Matej Knopp
none Details | Review

Description Matej Knopp 2011-12-05 02:09:20 UTC
Created attachment 202788 [details] [review]
Path to only reopen the decoder when new caps are different

Sometimes the pipeline is already playing when upstream element sends RECONFIGURE event which parser receives and subsequently sends another GST_EVENT_CAPS. The new CAPS event causes ffmpegdec to reopen decoder even when CAPS are same and decoding is already in progress, which can lead to decompression artifacts. 

The patch just checks if new caps are different than old before reopening the decoder. I'm not sure if this is the best solution, perhaps the problem should be dealt with on another level.
Comment 1 Matej Knopp 2011-12-05 14:59:07 UTC
Just a minor correction, the reconfigure event is handled by capsfilter after parser (added by decodebin)
Comment 2 Matej Knopp 2011-12-11 05:27:54 UTC
Created attachment 203206 [details] [review]
Only reopen decoder when new caps are different

I staged a chunk changing DTS rank in previous patch by accident.
Comment 3 Vincent Penquerc'h 2012-01-17 13:29:03 UTC
Looking at the patch, it seems worthwhile to point out https://bugzilla.gnome.org/show_bug.cgi?id=663333, which may or may not apply here, since gst_caps_is_equal is now used.
Otherwise, this patch seems to make sense at a first glance.
Comment 4 Wim Taymans 2012-02-20 15:25:09 UTC
commit a079886388399ae4eb6a15b7641b4b0a6ad7dcff
Author: Matej Knopp <matej.knopp@gmail.com>
Date:   Sun Dec 11 06:25:23 2011 +0100

    only reopen decoder when new caps are different