vaapidecode: reset decoder hard when set_format()

set_format() is called by upstream when the stream capabilites has changed.
Before, if the new stream is compatible with the old one the VA decoder was
not destroyed. Nonetheless, with this behavoir, the VA decoder ignores
when the upstreamer parsers gets more details of the stream, such as the
framerate. Hence, when the src caps are negotiates, the further sink caps
updates are ignored.

This patch forces the VA decoder destroying and recreation when set_format()
is called.

https://bugzilla.gnome.org/show_bug.cgi?id=770921
This commit is contained in:
Víctor Manuel Jáquez Leal 2016-09-14 16:29:01 +02:00
parent c18a6c97e1
commit 99d404f1df

View file

@ -1057,7 +1057,7 @@ gst_vaapidecode_set_format (GstVideoDecoder * vdec, GstVideoCodecState * state)
return FALSE;
if (!gst_vaapi_plugin_base_set_caps (plugin, decode->sinkpad_caps, NULL))
return FALSE;
if (!gst_vaapidecode_reset_full (decode, decode->sinkpad_caps, FALSE))
if (!gst_vaapidecode_reset_full (decode, decode->sinkpad_caps, TRUE))
return FALSE;
return TRUE;