msdk: decoder: fatal failure if negotiations fails

Otherwise it crashes when no parser is used placed upstream, v.gr.

gst-launch-1.0 filesrc location=file.264 ! msdkh264dec ! fakesink
This commit is contained in:
Víctor Manuel Jáquez Leal 2019-01-21 16:43:11 +01:00
parent f238066288
commit 5f67b4946e

View file

@ -933,7 +933,12 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
if (thiz->initialized && thiz->do_renego)
gst_video_codec_frame_ref (frame);
gst_msdkdec_negotiate (thiz, hard_reset);
if (!gst_msdkdec_negotiate (thiz, hard_reset)) {
GST_ELEMENT_ERROR (thiz, CORE, NEGOTIATION,
("Could not negotiate the stream"), (NULL));
flow = GST_FLOW_ERROR;
goto error;
}
}
for (;;) {