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 779695 - urisourcebin: Protect expose_output_pad() with lock
urisourcebin: Protect expose_output_pad() with lock
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-07 04:59 UTC by Seungha Yang
Modified: 2018-11-03 11:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
urisourcebin: Protect expose_output_pad() with lock (1.75 KB, patch)
2017-03-07 05:00 UTC, Seungha Yang
none Details | Review

Description Seungha Yang 2017-03-07 04:59:47 UTC
To ensure adding a pad one by one at once
Comment 1 Seungha Yang 2017-03-07 05:00:29 UTC
Created attachment 347362 [details] [review]
urisourcebin: Protect expose_output_pad() with lock
Comment 2 Seungha Yang 2017-03-07 05:03:47 UTC
<Error log>
0:00:00.167872375 15751 0x7190a600 DEBUG           urisourcebin gsturisourcebin.c:920:new_demuxer_pad_added_cb:<dashdemux0> new demuxer pad, name: <audio_00>. Added as pending pad with caps audio/x-m4a
0:00:00.167943833 15751 0x7190a600 DEBUG           urisourcebin gsturisourcebin.c:920:new_demuxer_pad_added_cb:<dashdemux0> new demuxer pad, name: <video_00>. Added as pending pad with caps video/quicktime
0:00:00.168089375 15751 0x7190a600 LOG             urisourcebin gsturisourcebin.c:949:pending_pad_blocked:<urisourcebin0> Removing pad <dashdemux0:video_00> from pending list
0:00:00.168567791 15751 0x72a02580 LOG             urisourcebin gsturisourcebin.c:949:pending_pad_blocked:<urisourcebin0> Removing pad <dashdemux0:audio_00> from pending list
0:00:00.168791083 15751 0x7190a600 LOG             urisourcebin gsturisourcebin.c:1209:get_output_slot:<urisourcebin0> Adding queue for adaptive streaming stream
0:00:00.169981250 15751 0x7190a600 LOG             urisourcebin gsturisourcebin.c:978:pending_pad_blocked:<urisourcebin0> Pad <dashdemux0:video_00> linked to slot 0x70e07a50
0:00:00.170351791 15751 0x72a02580 LOG             urisourcebin gsturisourcebin.c:1209:get_output_slot:<urisourcebin0> Adding queue for adaptive streaming stream
0:00:00.170905875 15751 0x7190a600 DEBUG               playbin3 gstplaybin3.c:5279:urisrc_pad_added:<playbin3-0> New pad <urisourcebin0:src_0> from urisourcebin <urisourcebin0> linking to <decodebin3-0:sink>
0:00:00.171399750 15751 0x72a02580 LOG             urisourcebin gsturisourcebin.c:978:pending_pad_blocked:<urisourcebin0> Pad <dashdemux0:audio_00> linked to slot 0x70e0e338
0:00:00.171722916 15751 0x72a02580 DEBUG               playbin3 gstplaybin3.c:5279:urisrc_pad_added:<playbin3-0> New pad <urisourcebin0:src_1> from urisourcebin <urisourcebin0> linking to <decodebin3-0:sink>
0:00:00.171872291 15751 0x72a02580 LOG               decodebin3 gstdecodebin3.c:1104:gst_decodebin3_input_pad_link:<decodebin3-0> Got link on input pad <decodebin3-0:sink>. Creating parsebin if needed
0:00:00.171904291 15751 0x72a02580 LOG               decodebin3 gstdecodebin3.c:1109:gst_decodebin3_input_pad_link:<decodebin3-0> input locking from thread 0x72a02580
0:00:00.171927291 15751 0x72a02580 LOG               decodebin3 gstdecodebin3.c:1109:gst_decodebin3_input_pad_link:<decodebin3-0> input locked from thread 0x72a02580
0:00:00.173474250 15751 0x72a02580 DEBUG             decodebin3 gstdecodebin3.c:1516:gst_decodebin3_handle_message:<decodebin3-0> Got Message state-changed
0:00:00.173568458 15751 0x72a02580 DEBUG             decodebin3 gstdecodebin3.c:1516:gst_decodebin3_handle_message:<decodebin3-0> Got Message state-changed
0:00:00.173646958 15751 0x72a02580 DEBUG             decodebin3 gstdecodebin3.c:1516:gst_decodebin3_handle_message:<decodebin3-0> Got Message async-start
0:00:00.173715791 15751 0x72a02580 FIXME               playbin3 gstplaybin3.c:3239:gst_play_bin3_handle_message:<playbin3-0> ASYNC_START[decodebin3-0]: prerolling state ... current: READY, next: PAUSED, pending: PAUSED
0:00:00.173808250 15751 0x7190a600 LOG               decodebin3 gstdecodebin3.c:1104:gst_decodebin3_input_pad_link:<decodebin3-0> Got link on input pad <decodebin3-0:sink>. Creating parsebin if needed
0:00:00.173843041 15751 0x7190a600 LOG               decodebin3 gstdecodebin3.c:1109:gst_decodebin3_input_pad_link:<decodebin3-0> input locking from thread 0x7190a600
0:00:00.173933500 15751 0x72a02580 DEBUG             decodebin3 gstdecodebin3.c:1516:gst_decodebin3_handle_message:<decodebin3-0> Got Message state-changed
0:00:00.174017916 15751 0x72a02580 LOG               decodebin3 gstdecodebin3.c:1112:gst_decodebin3_input_pad_link:<decodebin3-0> input unlocking from thread 0x72a02580
0:00:00.174057500 15751 0x7190a600 LOG               decodebin3 gstdecodebin3.c:1109:gst_decodebin3_input_pad_link:<decodebin3-0> input locked from thread 0x7190a600
0:00:00.174391833 15751 0x7190a600 LOG               decodebin3 gstdecodebin3.c:1112:gst_decodebin3_input_pad_link:<decodebin3-0> input unlocking from thread 0x7190a600
0:00:00.174083708 15751 0x72a02580 ERROR               playbin3 gstplaybin3.c:5293:urisrc_pad_added:<playbin3-0> failed to link pad urisourcebin0:src_1 to decodebin, reason was linked (-2)
Comment 3 Seungha Yang 2017-03-07 05:11:03 UTC
The commit of Bug#773131 moved source-group unlock point, and playbin3 might wrongly connect the urisource's srcpad with decodebin3's sinkpad.
So, we need to protect urisourcebin's pad-added in somewhere.

So, I'd like to handle this in urisourcebin, since expose_output_pad() in urisourcebin has been protected by lock in some other cases, but not adaptivedemux usecase.
Comment 4 Jan Schmidt 2017-03-07 11:07:42 UTC
It seems like linking new pads to decodebin3 should probably be serialised in playbin3 too, to catch the case where we have multiple input urisourcebin.

I think it's worth fixing in urisourcebin also - because it can be used outside playbin3 too.
Comment 5 GStreamer system administrator 2018-11-03 11:55:11 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/342.