GNOME Bugzilla – Bug 729321
playbin/subtitleoverlay: Deadlock when changing subtitle track while PAUSED
Last modified: 2014-05-10 13:46:48 UTC
When trying to change a subtitle track while the pipeline is PAUSED, it deadlock 100% of the time. The only thing that should be done to change subtitle track is: g_object_set(playbin, "current-text", $SOMETRACKID, NULL); When doing that on a PAUSED playbin pipeline we get that traceback:
+ Trace 233538
Thread 1 (Thread 0x7f936e84b840 (LWP 13004))
And last line of the debug log look like: 0:00:02.307971241 [333m13004[00m 0x233fe00 [37mDEBUG [00m [00m subtitleoverlay gstsubtitleoverlay.c:1881:gst_subtitle_overlay_subtitle_sink_event:<suboverlay:subtitle_sink>[00m Got event custom-downstream-oob event: 0x2528440, time 99:99:99.999999999, seq-num 2368, playsink-custom-subtitle-flush-finish; 0:00:02.307993140 [333m13004[00m 0x233fe00 [37mDEBUG [00m [00m subtitleoverlay gstsubtitleoverlay.c:1007:_pad_blocked_cb:<subtitle_sink:proxypad39>[00m Pad blocked 0:00:02.308003465 [333m13004[00m 0x233fe00 [37mDEBUG [00m [00m subtitleoverlay gstsubtitleoverlay.c:1038:_pad_blocked_cb:<suboverlay>[00m Current subtitle caps: text/x-raw, format=(string)pango-markup 0:00:02.308017699 [333m13004[00m 0x233fe00 [37mDEBUG [00m [00m subtitleoverlay gstsubtitleoverlay.c:1075:_pad_blocked_cb:<suboverlay>[00m Subtitle sink blocked but video not blocked 0:00:02.308026609 [333m13004[00m 0x233fe00 [37mDEBUG [00m [00;01;31;41m GST_PADS gstpad.c:3183:probe_hook_marshal:<subtitle_sink:proxypad39>[00m probe returned OK Basically what I understand is that on the main thread subtitlesoverlay starts waiting for its video sink pad to be blocked but that will never happen as we are PAUSED, queues are all full and we are prerolled. Any idea about how to fix that? You can simply reproduce using totem and the http://www.sintel.org/download sample file.
I meant to paste the backtrace with all threads:
+ Trace 233539
Created attachment 275526 [details] Some more debug logs + the full backtrace Interesting I did paste the full backtrace but BZ trims it to the main thread only.
Have to find out what the pad probe is that is blocking the event from the main thread. It should probably GST_PAD_PROBE_PASS all non-serialized events.
Created attachment 275527 [details] [review] subtitleoverlay: Don't block on non-serialized events
Does this fix it?
Created attachment 275528 [details] [review] playsinkconvertbin: Don't block on non-serialized events
Created attachment 275529 [details] [review] playsink: Don't block on non-serialized events
commit 0d87f8fdb2f881300c63ebd8b1535568e5979b2a Author: Sebastian Dröge <sebastian@centricular.com> Date: Thu May 1 13:15:57 2014 +0200 playbin: Don't block on non-serialized events https://bugzilla.gnome.org/show_bug.cgi?id=729321 commit 4d062b230a10d41442dbc6dd964a9e97db816e9a Author: Sebastian Dröge <sebastian@centricular.com> Date: Thu May 1 13:08:24 2014 +0200 playsink: Don't block on non-serialized events https://bugzilla.gnome.org/show_bug.cgi?id=729321 commit 67289fd18417d1c9fadf6429bd5ac490751577c4 Author: Sebastian Dröge <sebastian@centricular.com> Date: Thu May 1 13:06:53 2014 +0200 playsinkconvertbin: Don't block on non-serialized events https://bugzilla.gnome.org/show_bug.cgi?id=729321 commit ab0e37c32032679fb6d80c36220d7d877d497178 Author: Sebastian Dröge <sebastian@centricular.com> Date: Thu May 1 13:05:05 2014 +0200 subtitleoverlay: Don't block on non-serialized events https://bugzilla.gnome.org/show_bug.cgi?id=729321