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 688823 - Not able to display certain jpegs via playbin when using HTTP
Not able to display certain jpegs via playbin when using HTTP
Status: RESOLVED DUPLICATE of bug 626531
Product: GStreamer
Classification: Platform
Component: dont know
1.x
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-21 17:34 UTC by Jens Georg
Modified: 2013-07-23 13:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Failing testcase for the gstreamer unittests (599 bytes, patch)
2013-03-28 17:04 UTC, Emanuele Aina
rejected Details | Review

Description Jens Georg 2012-11-21 17:34:52 UTC
The jpeg at http://rygel-project.org/snapshot/testfiles/foo.jpg works fine when used with playbin from local file system, but when used via HTTP, playbin/decodebin decides to use avdec_mjpeg which then displays green garbage only.

This does not apply to all jpegs, displaying e.g. http://jensge.org/wp-content/uploads/2012/06/cropped-DSC018201.jpg works fine.
Comment 1 Emanuele Aina 2013-03-28 16:47:29 UTC
The following error is due to the fact that in foo.jpg the image data is preceded by EXIF and XMP metadata and this cause the type detector to fail to find the width and height of the image.

$ gst-launch-1.0 playbin uri=http://rygel-project.org/snapshot/testfiles/foo.jpg 

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Missing element: JPEG decoder
WARNING: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0: No decoder available for type 'image/jpeg'.
Additional debug info:
gsturidecodebin.c(879): unknown_type_cb (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0: Your GStreamer installation is missing a plug-in.
Additional debug info:
gstdecodebin2.c(3714): gst_decode_bin_expose (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0:
no suitable plugins found
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

With debug output enabled things go wrong after the following line:
decodebin gstdecodebin2.c:1873:connect_pad:<typefind> caps image/jpeg not subset of image/jpeg, width=(int)[ 1, 65535 ], height=(int)[ 1, 65535 ]

In fact at that point caps are just "image/jpeg".
Comment 2 Emanuele Aina 2013-03-28 17:04:47 UTC
Created attachment 240073 [details] [review]
Failing testcase for the gstreamer unittests

Testing that "image/jpeg" is a proper subset of "image/jpeg, width=(int)[ 1, 65535 ], height=(int)[ 1, 65535 ]" with gst_caps_is_subset() currently fails.
Comment 3 Emanuele Aina 2013-03-28 17:10:17 UTC
gst_caps_is_subset() docs say that:

 * <note>This function does not work reliably if optional properties for caps
 * are included on one caps and omitted on the other.</note>

It may be the case here. I'd suppose that gst/typefind/gsttypefindfunctions.c:jpeg_type_find() in gst-plugins-base should be changed to always return the width and height properties, even if unset.
Comment 4 Tim-Philipp Müller 2013-03-28 23:46:54 UTC
What is needed here is a jpegparse that's up to scratch, so it can be given a rank, and be put between src and decoder. The typefinder can't/shouldn't really set width/height to something random if it doesn't know. It could probably be fixed to handle the APPx markers better so that it actually gets to the SOF.
Comment 5 Sebastian Dröge (slomo) 2013-07-23 13:03:26 UTC
Comment on attachment 240073 [details] [review]
Failing testcase for the gstreamer unittests

This testcase is wrong. c2 is a superset of c1.
Comment 6 Sebastian Dröge (slomo) 2013-07-23 13:03:53 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 626531 ***