GNOME Bugzilla – Bug 668762
regression: playbin2: dvd menu doesn't come up with flags |= deinterlace
Last modified: 2012-03-12 16:47:30 UTC
dvd menus don't seem to come up for me if the deinterlace flag is set on playbin2, which is what totem sets. Doing a seek in totem via the left arrow key makes them come up though.
Is this a still-frame menu?
> Is this a still-frame menu? Yes, it is.
Rather unexpectedly traced to: commit 76b29367e7b13cc1751724cb2678ebd9039678e1 Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Thu Oct 6 11:53:26 2011 +0100 playbin2: fix mismatch between video/ and video/x-dvd-subpicture The new code was checking for a prefix, and would find video/ first. Check in two passes, first checking for a perfect match, and falling back to a prefix check if nothing was found. https://bugzilla.gnome.org/show_bug.cgi?id=657261 The hang is in a subtitleoverlay pad block. Somehow.
Removing that commit above makes it work, but it would re-break https://bugzilla.gnome.org/show_bug.cgi?id=657261. Including that commit breaks deinterlaced playback till at least 2010, so there is almost certainly another bug that got exposed by this change, though I haven't had luck finding it so far.
Traced to the delaying of events in basetransform. Replacing the colorspace by a queue in the deinterlacing chain fixes preroll, as does removing the delaying code. We end up with two threads blocked with an event in a pad blocked. Not sure how to fix it yet though.
Stuck trying to work out how to fix it, leaving it for now.
Back hacking on it, I have a bodge that "fixes" it, but doesn't appear to fix the root cause. Somehow, two threads are stuck on a blocked pad, one with a sink message event, and one with a custom event from the DVD demuxer. and with in gst_subtitle_overlay_subtitle_sink_event. That AFAIK should not happen, and should be fixed. diff --git a/gst/playback/gstsubtitleoverlay.c b/gst/playback/gstsubtitleoverlay.c index 126ffd2..0f3657f 100644 --- a/gst/playback/gstsubtitleoverlay.c +++ b/gst/playback/gstsubtitleoverlay.c @@ -2082,7 +2082,11 @@ gst_subtitle_overlay_subtitle_sink_event (GstPad * pad, GstEvent * event) break; } - ret = gst_proxy_pad_event_default (pad, gst_event_ref (event)); + if (GST_EVENT_TYPE (event) != GST_EVENT_CUSTOM_DOWNSTREAM_OOB) { + ret = gst_proxy_pad_event_default (pad, gst_event_ref (event)); + } else { + ret = TRUE; + } if (GST_EVENT_TYPE (event) == GST_EVENT_NEWSEGMENT) { gboolean update;
I'm seeing the issue with an animated menu DVD, so updating bug title accordingly.
Created attachment 206463 [details] [review] resindvd: fix wedge in preroll when playbin2 deinterlacing is enabled When deinterlacing is enabled, an extra colorspace element is added. Colorspace is a basetransform, and is then the only basetransform element on the video path. A while ago, basetransform started delaying events till caps were set on its source pad. These things conspired to end up sending the DVD highlight events onto a blocked pad on subtitleoverlay. Ensuring these highlight events are only sent once we're in playing mode fixes the issue.
I'd like to get an ack from someone who's more comfortable with playbin2 and events/preroll behavior, as I'm not so certain this is a proper fix.
Should be fine
Thanks, pushed, then: commit 7a9fff74c6b6a3bc9559d624af3e8d71f8771db8 Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Mon Jan 30 18:46:07 2012 +0000 resindvd: fix wedge in preroll when playbin2 deinterlacing is enabled When deinterlacing is enabled, an extra colorspace element is added. Colorspace is a basetransform, and is then the only basetransform element on the video path. A while ago, basetransform started delaying events till caps were set on its source pad. These things conspired to end up sending the DVD highlight events onto a blocked pad on subtitleoverlay. Ensuring these highlight events are only sent once we're in playing mode fixes the issue. https://bugzilla.gnome.org/show_bug.cgi?id=668762
I still experience such a bug (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=663582) with 0.10.23 which seems to include the bug fix according to the git repository. Did someone overlook someone, or is this another bug?
Hard to say without more information. Probably best to just file a new bug about it (and maybe mention this one for background).