decodebin3: Protect fields related to streams handling with the SELECTION_LOCK
authorThibault Saunier <thibault.saunier@osg.samsung.com>
Thu, 15 Jun 2017 16:48:42 +0000 (12:48 -0400)
committerEdward Hervey <bilboed@bilboed.com>
Tue, 18 Jul 2017 11:05:06 +0000 (13:05 +0200)
commit4b3798fedcd5be1aa76092e91a7d22663100d99f
tree4d74be8be5aaed68a8481ac3b3d3241f40a02be4
parent1188345886af566c306c6a9cfe9e08367860bfb1
decodebin3: Protect fields related to streams handling with the SELECTION_LOCK

Fields related to stream handling (input_streams,
output_streams, slots, guint slot_id) where used totally unprotected
until know.

This lead to several races, especially playing back RTSP streams.

To protect those fields, the OBJECT_LOCK can not be used as we sometimes
need to be able to post message on the bus while holding it.

decodebin3 already has a lock to manage stream selection, and in the end
it makes sense to protect all the stream management fields with the same
lock which is why we reuse the SELECTION_LOCK here.

https://bugzilla.gnome.org/show_bug.cgi?id=784012
gst/playback/gstdecodebin3-parse.c
gst/playback/gstdecodebin3.c