GNOME Bugzilla – Bug 764627
decodebin: backport fix from 1.8 to fix 1.6 regression
Last modified: 2016-04-14 18:08:43 UTC
The following scenario works with 1.4 but not 1.6: - make sure you don't have a H264 decoder installed (I do this by removing gst-libav from GST_PLUGIN_PATH). - gst-launch-1.0 uridecodebin uri="rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov" caps="video/x-h264,stream-format=avc;audio/mpeg" ! fakesink I get this error with 1.6 but not with 1.4: Missing element: H.264 decoder WARNING: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0: No decoder available for type 'video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal, parsed=(boolean)true'. Additional debug info: gsturidecodebin.c(939): unknown_type_cb (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0 Backporting this patch fixes the issue: https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=d50b713f44eb17ebf69aa771c26f8eb19e226319 1.6 logs: https://people.collabora.com/~cassidy/nodecoder-1.6.txt 1.6 + backported patch logs: https://people.collabora.com/~cassidy/nodecoder-back-1.6.txt The difference is when gst_rtp_h264_depay_negotiate() calls gst_pad_get_allowed_caps() on its source pad. With 1.6 the pad is not linked yet: gstrtph264depay.c:183:gst_rtp_h264_depay_negotiate:<rtph264depay0> allowed caps: (NULL) so h264parse use the default stream-format: bytestream. While in 1.8 (and with the backported patch) it is linked: gstrtph264depay.c:183:gst_rtp_h264_depay_negotiate:<rtph264depay0> allowed caps: video/x-h264, stream-format=(string)avc, alignment=(string)au; video/x-h264, stream-format=(string)byte-stream, alignment=(string){ nal, au } so h264parse will use the right format.
Forgot to mention that the regression has been introduced in 1.6 by https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=b15a47aa19507edb48124f32a055fe849b1004f5
IIRC there are more related commits in decodbin between 1.6 and 1.8. Someone needs to carefully go through them and backport all relevant ones. IIRC the commit in question introduced a regression related to pad handling in decodebin.
Yes, that commit (bug 742924) did cause a regression (bug 760949).
What should happen about this now? Anybody wants to track down all required changes or we just ignore it for 1.6?
I'm leaning towards ignoring it for 1.6 now, seeing that 1) it's "quite late" in the 1.6 cycle, and 2) this is clearly non-trivial with risks of new/other breakages being introduced as a result of the fixes, and 3) we don't even know what set of patches we need at this point. A unit test would be helpful to make sure it's not broken again in future.
Closing for now then.