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 542758 - [playbin2] Hangs in PLAYING forever if caps are not a subset of pad template caps
[playbin2] Hangs in PLAYING forever if caps are not a subset of pad template ...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal critical
: 0.10.26
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-07-13 10:28 UTC by Sebastian Dröge (slomo)
Modified: 2009-11-19 18:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for decodebin2 (8.97 KB, patch)
2009-11-19 17:56 UTC, Thiago Sousa Santos
committed Details | Review

Description Sebastian Dröge (slomo) 2008-07-13 10:28:16 UTC
Hi,
playbin2 currently has some problems with the file from bug #542646 too. If the check in gstmpeg2dec.c:631 is removed there will be caps that are not a subset of the pad template caps:

$ gst-launch-0.10 -v playbin2 uri=file://`pwd`/ffplay.m2v
Setting pipeline to PAUSED ...
/playbin20/uridecodebin0: source = (GstFileSrc) source
/playbin20/uridecodebin0/decodebin20/typefind.src: caps = video/mpeg, systemstream=(boolean)false, mpegversion=(int)1
/playbin20/uridecodebin0/decodebin20/mpeg2dec0.sink: caps = video/mpeg, systemstream=(boolean)false, mpegversion=(int)1
/playbin20/uridecodebin0/decodebin20/mpeg2dec0.src: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)704, height=(int)4580, pixel-aspect-ratio=(fraction)1145/132, framerate=(fraction)30000/1001
0:00:00.549227105 15019  0x918e3e0 ERROR             GST_CAPS gstpad.c:1998:gst_pad_get_caps_unlocked:<mpeg2dec0:src> pad returned caps video/x-raw-yuv, format=(fourcc)I420, width=(int)704, height=(int)4580, pixel-aspect-ratio=(fraction)1145/132, framerate=(fraction)30000/1001 which are not a real subset of its template caps video/x-raw-yuv, format=(fourcc){ YV12, I420, Y42B }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

(gst-launch-0.10:15019): GStreamer-WARNING **: pad mpeg2dec0:src returned caps which are not a real subset of its template caps
Pipeline is PREROLLED ...
0:00:00.550094885 15019  0x918e3e0 ERROR             playbin2 gstplaybin2.c:1795:perform_eos:<playbin20> failed to send EOS
Setting pipeline to PLAYING ...
New clock: GstSystemClock




And this forever. Changing the template caps to have width/hight in [16,MAX] will let playbin2 properly error out, same as with the check in line 631 enabled (i.e. what is in CVS).
Comment 1 Tim-Philipp Müller 2008-07-15 16:49:32 UTC
An element is supposed to post an error message on the bus if it returns GST_FLOW_ERROR, so that mpeg2dec commit [1] isn't really quite complete. Usually the element driving the pipeline will also post a generic internal flow error error message when the FLOW_ERROR reaches it, so it's worth investigating why this doesn't happen in this case (maybe the demuxer doesn't aggregate flows correctly?).

[1] http://webcvs.freedesktop.org/gstreamer/gst-plugins-ugly/ext/mpeg2dec/gstmpeg2dec.c?r1=1.126&r2=1.127

Comment 2 Thiago Sousa Santos 2009-10-20 13:55:05 UTC
I executed the file and mpegvideoparse is now plugged before mpeg2dec and I got that warning about subset of caps because the width/height is out of range.

I have a pending commit here that checks the width/height validity. But this bug still persists.

mpegvideoparse drops all buffers and receives EOS and then nothing happens.
Comment 3 Thiago Sousa Santos 2009-11-19 17:56:22 UTC
Created attachment 148135 [details] [review]
Patch for decodebin2
Comment 4 Sebastian Dröge (slomo) 2009-11-19 18:36:00 UTC
Review of attachment 148135 [details] [review]:

Looks good, please commit :)
Comment 5 Thiago Sousa Santos 2009-11-19 18:48:22 UTC
Pushed.

Module: gst-plugins-base
Branch: master
Commit: 0d6195686b07088e02bc861fdc6f4172e020e3dd
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=0d6195686b07088e02bc861fdc6f4172e020e3dd

Author: Thiago Santos <thiago.sousa.santos@collabora.co.uk>
Date:   Thu Nov 19 14:51:33 2009 -0300

decodebin2: error when all streams have no buffers
Comment 6 Thiago Sousa Santos 2009-11-19 18:48:53 UTC
Review of attachment 148135 [details] [review]:

Commited