mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
ttmlrender: Mark pad as needing reconfiguration again if it failed
And return FLUSHING instead of NOT_NEGOTIATED on flushing pads. https://bugzilla.gnome.org/show_bug.cgi?id=774623
This commit is contained in:
parent
b2dd97a3d0
commit
a1dc37b22b
1 changed files with 16 additions and 2 deletions
|
@ -317,6 +317,8 @@ gst_ttml_render_negotiate (GstTtmlRender * render, GstCaps * caps)
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (render, "performing negotiation");
|
GST_DEBUG_OBJECT (render, "performing negotiation");
|
||||||
|
|
||||||
|
gst_pad_check_reconfigure (render->srcpad);
|
||||||
|
|
||||||
if (!caps)
|
if (!caps)
|
||||||
caps = gst_pad_get_current_caps (render->video_sinkpad);
|
caps = gst_pad_get_current_caps (render->video_sinkpad);
|
||||||
else
|
else
|
||||||
|
@ -402,12 +404,16 @@ gst_ttml_render_negotiate (GstTtmlRender * render, GstCaps * caps)
|
||||||
|
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
|
if (!ret)
|
||||||
|
gst_pad_mark_reconfigure (render->srcpad);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
no_format:
|
no_format:
|
||||||
{
|
{
|
||||||
if (caps)
|
if (caps)
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
gst_pad_mark_reconfigure (render->srcpad);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -730,8 +736,16 @@ gst_ttml_render_push_frame (GstTtmlRender * render, GstBuffer * video_frame)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gst_pad_check_reconfigure (render->srcpad))
|
if (gst_pad_check_reconfigure (render->srcpad)) {
|
||||||
gst_ttml_render_negotiate (render, NULL);
|
if (!gst_ttml_render_negotiate (render, NULL)) {
|
||||||
|
gst_pad_mark_reconfigure (render->srcpad);
|
||||||
|
gst_buffer_unref (video_frame);
|
||||||
|
if (GST_PAD_IS_FLUSHING (render->srcpad))
|
||||||
|
return GST_FLOW_FLUSHING;
|
||||||
|
else
|
||||||
|
return GST_FLOW_NOT_NEGOTIATED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
video_frame = gst_buffer_make_writable (video_frame);
|
video_frame = gst_buffer_make_writable (video_frame);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue