diff options
author | Thibault Saunier <tsaunier@gnome.org> | 2014-08-15 13:31:53 +0200 |
---|---|---|
committer | Thibault Saunier <tsaunier@gnome.org> | 2014-08-15 13:40:17 +0200 |
commit | dcf8c3e8b0e54f753201dc60773530ba075c2eac (patch) | |
tree | 17b29a762389f690121e37d07b7abf1c0e360596 | |
parent | 568ef481c5a331585b131a4fd509efd5fcd5bcba (diff) |
discoverer: Set 'processing = FALSE' when done discovering SYNC
This avoids a race where we would get new tag but we are already
prerolled and analyzing results.
It is the way it is supposed to be handled as stated in comment:
"If preroll is complete, drop these tags - the collected information is
possibly already being processed and adding more tags would be racy"
-rw-r--r-- | gst-libs/gst/pbutils/gstdiscoverer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gst-libs/gst/pbutils/gstdiscoverer.c b/gst-libs/gst/pbutils/gstdiscoverer.c index da650f3f9..244b374e0 100644 --- a/gst-libs/gst/pbutils/gstdiscoverer.c +++ b/gst-libs/gst/pbutils/gstdiscoverer.c @@ -1462,6 +1462,11 @@ handle_current_sync (GstDiscoverer * dc) dc->priv->current_info->result = GST_DISCOVERER_TIMEOUT; } + DISCO_LOCK (dc); + dc->priv->processing = FALSE; + DISCO_UNLOCK (dc); + + GST_DEBUG ("Done"); g_timer_stop (timer); |