summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2014-07-06 22:16:48 +0100
committerTim-Philipp Müller <tim@centricular.com>2014-07-06 22:16:48 +0100
commit341dc8aecf460bd28868035a8c35d6a7c8bdeec3 (patch)
treeef7f7a45e3eb64fbff886c72915840dac3d6fb63
parent551122c19a673a75463ad08b0872af862b822970 (diff)
downloadgstreamer-plugins-bad-341dc8aecf460bd28868035a8c35d6a7c8bdeec3.tar.gz
videoaggregator: fix broken locking in update_src_caps function
We would unlock an already-unlocked mutex that we never re-locked. https://bugzilla.gnome.org/show_bug.cgi?id=732750
-rw-r--r--gst-libs/gst/video/gstvideoaggregator.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c
index e3d4f809b..82b041fc8 100644
--- a/gst-libs/gst/video/gstvideoaggregator.c
+++ b/gst-libs/gst/video/gstvideoaggregator.c
@@ -555,7 +555,6 @@ gst_videoaggregator_update_src_caps (GstVideoAggregator * vagg)
best_fps_d = fps_d;
}
}
- GST_OBJECT_UNLOCK (vagg);
if (best_fps_n <= 0 || best_fps_d <= 0 || best_fps == 0.0) {
best_fps_n = 25;
@@ -583,6 +582,8 @@ gst_videoaggregator_update_src_caps (GstVideoAggregator * vagg)
info.par_n = GST_VIDEO_INFO_PAR_N (&vagg->info);
info.par_d = GST_VIDEO_INFO_PAR_D (&vagg->info);
+ GST_OBJECT_UNLOCK (vagg);
+
if (vagg_klass->update_info) {
if (!vagg_klass->update_info (vagg, &info)) {
ret = FALSE;
@@ -594,6 +595,9 @@ gst_videoaggregator_update_src_caps (GstVideoAggregator * vagg)
caps = gst_video_info_to_caps (&info);
peercaps = gst_pad_peer_query_caps (agg->srcpad, NULL);
+
+ GST_OBJECT_LOCK (vagg);
+
if (peercaps) {
GstCaps *tmp;