summaryrefslogtreecommitdiff
path: root/ext/ttml
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-11-17 20:19:44 +0200
committerSebastian Dröge <sebastian@centricular.com>2016-11-18 12:22:44 +0200
commita1dc37b22b5eaea2b1cf469b84c01900de7c0cfa (patch)
treeff8e72e50e035044619801ce9275cff497a77176 /ext/ttml
parentb2dd97a3d0f6ba6d786aff38ef7e97e80eb65159 (diff)
downloadgstreamer-plugins-bad-a1dc37b22b5eaea2b1cf469b84c01900de7c0cfa.tar.gz
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
Diffstat (limited to 'ext/ttml')
-rw-r--r--ext/ttml/gstttmlrender.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/ext/ttml/gstttmlrender.c b/ext/ttml/gstttmlrender.c
index 91acfb428..8956d7bdd 100644
--- a/ext/ttml/gstttmlrender.c
+++ b/ext/ttml/gstttmlrender.c
@@ -317,6 +317,8 @@ gst_ttml_render_negotiate (GstTtmlRender * render, GstCaps * caps)
GST_DEBUG_OBJECT (render, "performing negotiation");
+ gst_pad_check_reconfigure (render->srcpad);
+
if (!caps)
caps = gst_pad_get_current_caps (render->video_sinkpad);
else
@@ -402,12 +404,16 @@ gst_ttml_render_negotiate (GstTtmlRender * render, GstCaps * caps)
gst_caps_unref (caps);
+ if (!ret)
+ gst_pad_mark_reconfigure (render->srcpad);
+
return ret;
no_format:
{
if (caps)
gst_caps_unref (caps);
+ gst_pad_mark_reconfigure (render->srcpad);
return FALSE;
}
}
@@ -730,8 +736,16 @@ gst_ttml_render_push_frame (GstTtmlRender * render, GstBuffer * video_frame)
goto done;
}
- if (gst_pad_check_reconfigure (render->srcpad))
- gst_ttml_render_negotiate (render, NULL);
+ if (gst_pad_check_reconfigure (render->srcpad)) {
+ 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);