vaapidecode: init {decoded,display}_info at open()

It is required to initialize {decoded,display}_info variables when the decoder
is open, not only at instance initialization.

https://bugzilla.gnome.org/show_bug.cgi?id=764316
This commit is contained in:
Víctor Manuel Jáquez Leal 2016-04-14 16:10:02 +02:00
parent 3478b27c92
commit 80eb682b64

View file

@ -927,6 +927,9 @@ gst_vaapidecode_open (GstVideoDecoder * vdec)
if (!gst_vaapi_plugin_base_open (GST_VAAPI_PLUGIN_BASE (decode)))
return FALSE;
gst_video_info_init (&decode->decoded_info);
gst_video_info_init (&decode->display_info);
/* Let GstVideoContext ask for a proper display to its neighbours */
/* Note: steal old display that may be allocated from get_caps()
so that to retain a reference to it, thus avoiding extra
@ -1276,9 +1279,6 @@ gst_vaapidecode_init (GstVaapiDecode * decode)
g_mutex_init (&decode->surface_ready_mutex);
g_cond_init (&decode->surface_ready);
gst_video_info_init (&decode->decoded_info);
gst_video_info_init (&decode->display_info);
gst_video_decoder_set_packetized (vdec, FALSE);
}