mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-27 11:32:51 +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;
|
||||
res = TRUE;
|
||||
} else {
|
||||
gst_segment_init (&typefind->segment, GST_FORMAT_UNDEFINED);
|
||||
res = gst_pad_stop_task (pad);
|
||||
gst_segment_init (&typefind->segment, GST_FORMAT_UNDEFINED);
|
||||
}
|
||||
break;
|
||||
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);
|
||||
else
|
||||
} else {
|
||||
stop_typefinding (typefind);
|
||||
|
||||
gst_segment_init (&typefind->segment, GST_FORMAT_UNDEFINED);
|
||||
}
|
||||
res = TRUE;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue