Commit af91ba16 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

avviddec: Error out if we try to allocate a buffer without being negotiated

Otherwise we just run into assertions because we should've errored out
already.
parent 18667c56
......@@ -1127,6 +1127,9 @@ get_output_buffer (GstFFMpegVidDec * ffmpegdec, GstVideoCodecFrame * frame)
GST_LOG_OBJECT (ffmpegdec, "get output buffer");
if (!ffmpegdec->output_state)
goto not_negotiated;
ret =
gst_video_decoder_allocate_output_frame (GST_VIDEO_DECODER (ffmpegdec),
frame);
......@@ -1167,9 +1170,14 @@ get_output_buffer (GstFFMpegVidDec * ffmpegdec, GstVideoCodecFrame * frame)
/* special cases */
alloc_failed:
{
GST_DEBUG_OBJECT (ffmpegdec, "pad_alloc failed");
GST_DEBUG_OBJECT (ffmpegdec, "allocation failed");
return ret;
}
not_negotiated:
{
GST_DEBUG_OBJECT (ffmpegdec, "not negotiated");
return GST_FLOW_NOT_NEGOTIATED;
}
}
static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment