summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2014-07-06 23:30:53 +0200
committerThibault Saunier <tsaunier@gnome.org>2014-07-06 23:36:10 +0200
commite4b07ee51d4d13387fd93f1f78ed85a7b6d0b1a3 (patch)
tree88c45ba949ae0d52f912a9e95f5b2d2ba3453899 /gst-libs
parent341dc8aecf460bd28868035a8c35d6a7c8bdeec3 (diff)
videoaggregator: Fix some more the locking logic in update_src_caps
We need the GST_OBJECT_LOCK only to iterate the sinkpads, nothing else. https://bugzilla.gnome.org/show_bug.cgi?id=732750
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/video/gstvideoaggregator.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c
index 82b041fc8..09dcbb71d 100644
--- a/gst-libs/gst/video/gstvideoaggregator.c
+++ b/gst-libs/gst/video/gstvideoaggregator.c
@@ -555,6 +555,7 @@ 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;
@@ -582,8 +583,6 @@ 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;
@@ -595,9 +594,6 @@ 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;
@@ -614,7 +610,6 @@ gst_videoaggregator_update_src_caps (GstVideoAggregator * vagg)
GST_DEBUG_OBJECT (vagg, "empty caps");
ret = FALSE;
GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
- GST_OBJECT_UNLOCK (vagg);
goto done;
}
@@ -634,7 +629,6 @@ gst_videoaggregator_update_src_caps (GstVideoAggregator * vagg)
caps = gst_video_info_to_caps (&info);
GST_VIDEO_AGGREGATOR_UNLOCK (vagg);
- GST_OBJECT_UNLOCK (vagg);
if (gst_videoaggregator_src_setcaps (vagg, caps)) {
if (vagg_klass->negotiated_caps)