GNOME Bugzilla – Bug 667571
[0.11] [playbin] Crashes and warnings when using suburi property
Last modified: 2012-01-27 16:00:13 UTC
When taking these two files: http://samples.mplayerhq.hu/sub/thief.avi http://samples.mplayerhq.hu/sub/thief.sub GStreamer-CRITICAL **: gst_caps_get_structure: assertion `index < GST_CAPS_LEN (caps)' failed aborting...
+ Trace 229418
Thread 140737289619200 (LWP 9624)
(gst-launch-0.11:9608): GStreamer-CRITICAL **: gst_caps_get_structure: assertion `index < GST_CAPS_LEN (caps)' failed (gst-launch-0.11:9608): GStreamer-CRITICAL **: gst_structure_get_name: assertion `structure != NULL' failed Program received signal SIGSEGV, Segmentation fault.
+ Trace 229419
Eventually tracked down, but not yet fixed: - subparse typefinds correctly, and set caps on its src pad before it is linked - setting caps in 0.11 sends a caps event, changed from 0.10 - the caps event is sticky, so it kept for later pushing - delayed sticky events are send when a buffer is next pushed - playbin2 tries to get caps from downstream before a buffer is pushed - downstream has not heard of any caps yet, so ends up using ANY - ANY caps don't have structures, so getting the first one asserts I'm not sure where to flip a bit to cause this to fall into place again. I tried to send delayed sticky events after linking pads, but that's too early. subparse does not receive any event/query where it could react. I'll go on looking, but if the above triggers someone's eureka moment, let me know :)
Created attachment 206087 [details] [review] typefind: answer caps queries with our typefound caps This avoids merely forwarding the event to the sink, and getting something useless such as ANY.
This fixes ANY caps reaching playbin2, we now get the appropriate subtitle caps. However, while this fixes the criticals here, this does not fix playback of the sample, as we hit: error: Can't play a text file without video or visualizations. Which is odd since there is a video (I can't play the sample above due to lack of working plugin, but it also happens for an Ogg video which plays fine without "suburi=..."). I'm not sure yet whether it's a linked bug, or another one altogether, so I'll keep this bug open for continuing investigating the does-not-play issue.
Other bugs seem unrelated to this patch, so I've open a clone for the rest, and I'm moving this to core, where the criticals patch is.
This patch causes a simple gst-launch-0.11 playbin uri=file:///tmp/sample.mp3 pipeline to fail to go to PLAYING.
On deeper inspection, this patch actually fixes a bug (MP3 source being ANY, and failing to autoplug anything), and goes further, where there is a hang. So the patch is alright, and the failure is unrelated, even if only visible with this patch in.
What's missing here now?
For the crashing/asserting, nothing. I just wasn't certain the patch was the correct way of addressing the issue, or just papering over the cracks, so did not close it yet. Now, the movie+subs playback doesn't actually work yet (see https://bugzilla.gnome.org/show_bug.cgi?id=668682), and I've left it alone for now as I wasn't doing much progress anymore. It's currently at "textoverlay plugged alright, but does not preroll". So this bug can be closed, and I'll go back to 668682 next week.