GNOME Bugzilla – Bug 542758
[playbin2] Hangs in PLAYING forever if caps are not a subset of pad template caps
Last modified: 2009-11-19 18:48:53 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).
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
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.
Created attachment 148135 [details] [review] Patch for decodebin2
Review of attachment 148135 [details] [review]: Looks good, please commit :)
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
Review of attachment 148135 [details] [review]: Commited