From 279fb3d99fa2df1c87976a70a75ece4ebb3ff7b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 17 Nov 2016 20:20:52 +0200 Subject: [PATCH] vtdec: 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 --- sys/applemedia/vtdec.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/applemedia/vtdec.c b/sys/applemedia/vtdec.c index fc81774ac8..472e39eb4e 100644 --- a/sys/applemedia/vtdec.c +++ b/sys/applemedia/vtdec.c @@ -808,7 +808,14 @@ gst_vtdec_push_frames_if_needed (GstVtdec * vtdec, gboolean drain, /* negotiate now so that we know whether we need to use the GL upload meta or * not */ if (gst_pad_check_reconfigure (decoder->srcpad)) { - gst_video_decoder_negotiate (decoder); + if (!gst_video_decoder_negotiate (decoder)) { + gst_pad_mark_reconfigure (decoder->srcpad); + if (GST_PAD_IS_FLUSHING (decoder->srcpad)) + ret = GST_FLOW_FLUSHING; + else + ret = GST_FLOW_NOT_NEGOTIATED; + return ret; + } } if (drain)