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 697177 - decodebin2: caps are considered final too often when optional fields are present in raw caps
decodebin2: caps are considered final too often when optional fields are pres...
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-03 14:18 UTC by Vincent Penquerc'h
Modified: 2013-04-03 14:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Potential patch - fixes my issue, but may break others (1.01 KB, patch)
2013-04-03 14:18 UTC, Vincent Penquerc'h
none Details | Review

Description Vincent Penquerc'h 2013-04-03 14:18:17 UTC
Created attachment 240481 [details] [review]
Potential patch - fixes my issue, but may break others

decodebin2 will consider some caps as final, though it should not, in the following case:

- Set the "caps" property on decodebin2 to something including fields, eg: video/x-h264,width=854,height=480;audio/x-vorbis
- Set the source to a MP4 file which will go through qtdemux, this file having a different size that the above caps

qtdemux will output caps without width/height set. decodebin2 will try to intersect the caps, and succeed, and thus consider the caps from qtdemux as final, and will not attempt to plug a decoder in.

This becomes important when there is an encodebin later (ie, source ! decodebin2 ! encodebin ! sink), where this encodebin is instructed to perform some scaling via caps restrictions on its profile. If the input has the same encoded format as what is requested on the output of encodebin, decodebin2 will not decode, and encodebin will be unable to resize encoded video, passing it through unscaled.

A patch attached fixes the issue, but is not quite right. Testing for caps subset does not work either, as gst_caps_is_subset will happily lie about video/x-h264, parsed=(boolean)true, stream-format=(string){ avc, byte-stream }, alignment=(string){ au, nal } being a subset of video/x-h264, width=(int)854, height=(int)48.

This could be argued to be a bug in _is_subset, but this has been known for a while as a known limitation I think.

Sample file that shows the issue:
http://people.collabora.com/~vincent/big_buck_bunny_1080p_h264_hbh_20MB.m4v
Comment 1 Tim-Philipp Müller 2013-04-03 14:40:15 UTC
This sounds very much like a case of "known issue, fixed in 1.0" :)

I think the best solution for you is to do whatever you need to do in an "autoplug-continue" callback instead of using the "caps" property.

I'm not sure it's fixable in 0.10.
Comment 2 Vincent Penquerc'h 2013-04-03 14:54:31 UTC
Hmm, I see. Closing, then, thanks.