mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
pad: refuse events in flushing
when we are flushing, don't store the event on the pad but simply return FALSE. Don't deactivate the srcpad, we need it to be active in order to push the caps. Downstream can change the scheduling mode of an active pad.
This commit is contained in:
parent
6ed869c9f4
commit
756f6eb3f2
2 changed files with 13 additions and 3 deletions
|
@ -4302,6 +4302,9 @@ gst_pad_push_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
default:
|
||||
{
|
||||
if (G_UNLIKELY (GST_PAD_IS_FLUSHING (pad)))
|
||||
goto flushed;
|
||||
|
||||
/* store the event on the pad, but only on srcpads */
|
||||
if (GST_PAD_IS_SRC (pad) && GST_EVENT_IS_STICKY (event)) {
|
||||
guint idx;
|
||||
|
@ -4357,9 +4360,6 @@ gst_pad_push_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
|
||||
if (G_UNLIKELY (GST_PAD_IS_FLUSHING (pad)))
|
||||
goto flushed;
|
||||
|
||||
PROBE_PUSH (pad, type | GST_PAD_PROBE_TYPE_PUSH |
|
||||
GST_PAD_PROBE_TYPE_BLOCK, event, probe_stopped);
|
||||
|
||||
|
|
|
@ -965,6 +965,8 @@ gst_type_find_element_activate (GstPad * pad)
|
|||
(guint64) size, ext, &probability);
|
||||
g_free (ext);
|
||||
|
||||
GST_DEBUG ("Found caps %" GST_PTR_FORMAT, found_caps);
|
||||
|
||||
gst_object_unref (peer);
|
||||
}
|
||||
}
|
||||
|
@ -983,13 +985,18 @@ gst_type_find_element_activate (GstPad * pad)
|
|||
}
|
||||
|
||||
/* 3 */
|
||||
GST_DEBUG ("Deactivate pull mode");
|
||||
gst_pad_activate_pull (pad, FALSE);
|
||||
|
||||
#if 0
|
||||
/* 4 */
|
||||
GST_DEBUG ("Deactivate push mode mode");
|
||||
gst_pad_activate_push (typefind->src, FALSE);
|
||||
#endif
|
||||
|
||||
/* 5 */
|
||||
if (!found_caps || probability < typefind->min_probability) {
|
||||
GST_DEBUG ("Trying to guess using extension");
|
||||
found_caps = gst_type_find_guess_by_extension (typefind, pad, &probability);
|
||||
}
|
||||
|
||||
|
@ -1002,9 +1009,11 @@ gst_type_find_element_activate (GstPad * pad)
|
|||
|
||||
done:
|
||||
/* 7 */
|
||||
GST_DEBUG ("Emiting found caps %" GST_PTR_FORMAT, found_caps);
|
||||
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE],
|
||||
0, probability, found_caps);
|
||||
typefind->mode = MODE_NORMAL;
|
||||
|
||||
really_done:
|
||||
gst_caps_unref (found_caps);
|
||||
|
||||
|
@ -1014,6 +1023,7 @@ really_done:
|
|||
else {
|
||||
gboolean ret;
|
||||
|
||||
GST_DEBUG ("Activating in push mode");
|
||||
ret = gst_pad_activate_push (typefind->src, TRUE);
|
||||
ret &= gst_pad_activate_push (pad, TRUE);
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue