Revert "vaapidecode: implement negotiate() vmethod"
This reverts commit 3285121181295c544480fc6ba756845b16285d30. videodecode's negotiate() vmethod is also called when events arrive, but this would mean that the proper configuration of sink pad might not be complete, thus we should not update the src pad. Let's keep the old non-vmethod negotitate().
This commit is contained in:
parent
2d9547273e
commit
ba49dc9dd7
@ -458,18 +458,20 @@ set_display_res:
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_vaapidecode_negotiate (GstVideoDecoder * vdec)
|
||||
gst_vaapidecode_negotiate (GstVaapiDecode * decode)
|
||||
{
|
||||
GstVaapiDecode *const decode = GST_VAAPIDECODE (vdec);
|
||||
GstVideoDecoder *const vdec = GST_VIDEO_DECODER (decode);
|
||||
GstVaapiPluginBase *const plugin = GST_VAAPI_PLUGIN_BASE (vdec);
|
||||
|
||||
GST_DEBUG_OBJECT (decode, "Input codec state changed, doing renegotiation");
|
||||
|
||||
if (!gst_vaapi_plugin_base_set_caps (plugin, decode->sinkpad_caps, NULL))
|
||||
return FALSE;
|
||||
if (!gst_vaapidecode_update_src_caps (decode))
|
||||
return FALSE;
|
||||
if (!gst_vaapi_plugin_base_set_caps (plugin, NULL, decode->srcpad_caps))
|
||||
return FALSE;
|
||||
if (!GST_VIDEO_DECODER_CLASS (parent_class)->negotiate (vdec))
|
||||
if (!gst_video_decoder_negotiate (vdec))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
@ -507,8 +509,8 @@ gst_vaapidecode_push_decoded_frame (GstVideoDecoder * vdec,
|
||||
|
||||
if (gst_pad_needs_reconfigure (GST_VIDEO_DECODER_SRC_PAD (vdec))
|
||||
|| alloc_renegotiate || caps_renegotiate) {
|
||||
GST_INFO_OBJECT (decode, "input codec state changed: renegotiating");
|
||||
if (!gst_video_decoder_negotiate (vdec))
|
||||
|
||||
if (!gst_vaapidecode_negotiate (decode))
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
@ -1308,7 +1310,6 @@ gst_vaapidecode_class_init (GstVaapiDecodeClass * klass)
|
||||
vdec_class->sink_query = GST_DEBUG_FUNCPTR (gst_vaapidecode_sink_query);
|
||||
vdec_class->getcaps = GST_DEBUG_FUNCPTR (gst_vaapidecode_sink_getcaps);
|
||||
vdec_class->sink_event = GST_DEBUG_FUNCPTR (gst_vaapidecode_sink_event);
|
||||
vdec_class->negotiate = GST_DEBUG_FUNCPTR (gst_vaapidecode_negotiate);
|
||||
|
||||
map = (GstVaapiDecoderMap *) g_type_get_qdata (G_OBJECT_CLASS_TYPE (klass),
|
||||
GST_VAAPI_DECODE_PARAMS_QDATA);
|
||||
|
Loading…
x
Reference in New Issue
Block a user