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
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: