summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-03-12 12:59:57 +0000
committerSebastian Dröge <sebastian@centricular.com>2015-03-12 12:59:57 +0000
commit53e8e7da75e4eeaa1054eb24e50568b32d8bd6b1 (patch)
tree0d5e84c4dfb2b261aa23f9dabe6adf7d31202918
parenta7797d30a857fe739f57103375608e3b999d980f (diff)
typefind: Reset segment when deactivating pull mode or not running in pull mode
We use the segment format to detect if we run the streaming thread or not. Without resetting we might believe we do so, although we only did in the past and are now running in e.g. push mode. https://bugzilla.gnome.org/show_bug.cgi?id=745073
-rw-r--r--plugins/elements/gsttypefindelement.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/elements/gsttypefindelement.c b/plugins/elements/gsttypefindelement.c
index 9af1e2317..6ac9133ac 100644
--- a/plugins/elements/gsttypefindelement.c
+++ b/plugins/elements/gsttypefindelement.c
@@ -1179,10 +1179,12 @@ gst_type_find_element_activate_sink_mode (GstPad * pad, GstObject * parent,
typefind->offset = 0;
res = TRUE;
} else {
+ gst_segment_init (&typefind->segment, GST_FORMAT_UNDEFINED);
res = gst_pad_stop_task (pad);
}
break;
case GST_PAD_MODE_PUSH:
+ gst_segment_init (&typefind->segment, GST_FORMAT_UNDEFINED);
if (active)
start_typefinding (typefind);
else