dvbsuboverlay: Clean up locking some more
This commit is contained in:
parent
92109fdfbc
commit
672cb276be
@ -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
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user