decodebin: protect buffering message handling

Use the object lock to avoid concurrent processing which leads
to small disasters (assertions or crashes)
This commit is contained in:
Thiago Santos 2014-09-11 16:58:35 -03:00
parent 0ea1b559bf
commit 3657929e1f

View file

@ -4862,6 +4862,7 @@ gst_decode_bin_handle_message (GstBin * bin, GstMessage * msg)
* on the list to this new value
*/
GST_OBJECT_LOCK (dbin);
gst_message_parse_buffering (msg, &msg_perc);
/*
@ -4915,6 +4916,7 @@ gst_decode_bin_handle_message (GstBin * bin, GstMessage * msg)
} else {
gst_message_replace (&msg, smaller);
}
GST_OBJECT_UNLOCK (dbin);
}
if (drop)