vaapidecode: commit updated srcpad caps to base plugin.

Make sure that the GstVaapiPluginBase instance receives the new src
pad caps whenever they get updated from within the GstVaapiDecoder
decode routines.

This also ensures that downstream elements receive correctly sized
SW decoded buffers if needed.

https://bugs.tizen.org/jira/browse/TC-114
This commit is contained in:
Gwenole Beauchesne 2015-01-15 16:23:24 +01:00
parent 0777f357aa
commit b8744f5b9a

View file

@ -115,11 +115,16 @@ gst_vaapi_decoder_state_changed(GstVaapiDecoder *decoder,
{
GstVaapiDecode * const decode = GST_VAAPIDECODE(user_data);
GstVideoDecoder * const vdec = GST_VIDEO_DECODER(decode);
GstVaapiPluginBase * const plugin = GST_VAAPI_PLUGIN_BASE(vdec);
g_assert(decode->decoder == decoder);
gst_vaapidecode_update_src_caps(decode, codec_state);
gst_video_decoder_negotiate(vdec);
if (gst_vaapidecode_update_src_caps(decode, codec_state)) {
if (!gst_video_decoder_negotiate(vdec))
return;
if (!gst_vaapi_plugin_base_set_caps(plugin, NULL, decode->srcpad_caps))
return;
}
}
static inline gboolean