mpeg2dec: Call gst_video_decoder_negotiate()

This commit is contained in:
Edward Hervey 2012-07-18 18:32:54 +02:00
parent 882e408340
commit 090e139048

View file

@ -714,6 +714,9 @@ handle_sequence (GstMpeg2dec * mpeg2dec, const mpeg2_info_t * info)
gst_video_decoder_set_latency (GST_VIDEO_DECODER (mpeg2dec), latency,
latency);
if (!gst_video_decoder_negotiate (GST_VIDEO_DECODER (mpeg2dec)))
goto negotiation_fail;
gst_video_codec_state_unref (state);
mpeg2_custom_fbuf (mpeg2dec->decoder, 1);
@ -740,6 +743,12 @@ invalid_size:
sequence->width, sequence->height);
return GST_FLOW_ERROR;
}
negotiation_fail:
{
GST_WARNING_OBJECT (mpeg2dec, "Failed to negotiate with downstream");
return GST_FLOW_ERROR;
}
}
static GstFlowReturn