mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
typefindelement: reset segment only once streaming has stopped
Fixes the occasional criticals in the discoverer unit test. https://bugzilla.gnome.org/show_bug.cgi?id=745073 https://bugzilla.gnome.org/show_bug.cgi?id=750823
This commit is contained in:
parent
2448a62ff4
commit
7be8acbfb0
1 changed files with 6 additions and 5 deletions
|
@ -1196,17 +1196,18 @@ gst_type_find_element_activate_sink_mode (GstPad * pad, GstObject * parent,
|
||||||
typefind->offset = 0;
|
typefind->offset = 0;
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
} else {
|
} else {
|
||||||
gst_segment_init (&typefind->segment, GST_FORMAT_UNDEFINED);
|
|
||||||
res = gst_pad_stop_task (pad);
|
res = gst_pad_stop_task (pad);
|
||||||
|
gst_segment_init (&typefind->segment, GST_FORMAT_UNDEFINED);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GST_PAD_MODE_PUSH:
|
case GST_PAD_MODE_PUSH:
|
||||||
gst_segment_init (&typefind->segment, GST_FORMAT_UNDEFINED);
|
if (active) {
|
||||||
if (active)
|
gst_segment_init (&typefind->segment, GST_FORMAT_UNDEFINED);
|
||||||
start_typefinding (typefind);
|
start_typefinding (typefind);
|
||||||
else
|
} else {
|
||||||
stop_typefinding (typefind);
|
stop_typefinding (typefind);
|
||||||
|
gst_segment_init (&typefind->segment, GST_FORMAT_UNDEFINED);
|
||||||
|
}
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue