dvbsuboverlay: Clean up locking some more

This commit is contained in:
Sebastian Dröge 2010-12-03 16:08:13 +01:00 committed by Edward Hervey
parent 92109fdfbc
commit 672cb276be
2 changed files with 3 additions and 3 deletions

View File

@ -756,7 +756,9 @@ gst_dvbsub_overlay_process_text (GstDVBSubOverlay * overlay, GstBuffer * buffer,
" which is a running time of %" GST_TIME_FORMAT,
pts, GST_TIME_ARGS (pts));
GST_DEBUG_OBJECT (overlay, "Feeding %u bytes to libdvbsub", size);
g_mutex_lock (overlay->dvbsub_mutex);
dvb_sub_feed_with_pts (overlay->dvb_sub, pts, data, size);
g_mutex_unlock (overlay->dvbsub_mutex);
gst_buffer_unref (buffer);
}
@ -771,9 +773,7 @@ new_dvb_subtitles_cb (DvbSub * dvb_sub, DVBSubtitles * subs, gpointer user_data)
subs->page_time_out, subs->num_rects, subs->pts,
GST_TIME_ARGS (subs->pts));
g_mutex_lock (overlay->dvbsub_mutex);
g_queue_push_tail (overlay->pending_subtitles, subs);
g_mutex_unlock (overlay->dvbsub_mutex);
}
static GstFlowReturn

View File

@ -57,7 +57,7 @@ struct _GstDVBSubOverlay
GQueue *pending_subtitles; /* A queue of raw subtitle region sets with
* metadata that are waiting their running time */
GMutex *dvbsub_mutex; /* FIXME: Do we need a mutex lock in case of libdvbsub? Probably, but... */
GMutex *dvbsub_mutex; /* protects the queue and the DvbSub instance */
DvbSub *dvb_sub;
};