summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-09-25 15:50:19 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-09-26 11:44:38 +0200
commit6b98d6a0763e366e3d663c7ba91c5d5cf9c17bbd (patch)
tree1bc2d510e29fe32f02e04dbe08e3add977a5bdf3
parenta4c60fb2a96e52bf3244a0ae74d3d2eeaea3acc1 (diff)
vaapidecode: drain pending frames before set format
Drain pending frames, if any, in the internal decoder before setting the new negotiated format. https://bugzilla.gnome.org/show_bug.cgi?id=786173
-rw-r--r--gst/vaapi/gstvaapidecode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c
index 9401fe81..71436cd1 100644
--- a/gst/vaapi/gstvaapidecode.c
+++ b/gst/vaapi/gstvaapidecode.c
@@ -1071,6 +1071,8 @@ gst_vaapidecode_set_format (GstVideoDecoder * vdec, GstVideoCodecState * state)
if (!gst_vaapi_decode_input_state_replace (decode, state))
return TRUE;
+ if (gst_vaapidecode_drain (vdec) == GST_FLOW_ERROR)
+ return FALSE;
if (!gst_vaapidecode_update_sink_caps (decode, state->caps))
return FALSE;
if (!gst_vaapi_plugin_base_set_caps (plugin, decode->sinkpad_caps, NULL))