mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 10:42:22 +00:00
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.
This commit is contained in:
parent
18667c5698
commit
af91ba1620
1 changed files with 9 additions and 1 deletions
|
@ -1127,6 +1127,9 @@ get_output_buffer (GstFFMpegVidDec * ffmpegdec, GstVideoCodecFrame * frame)
|
||||||
|
|
||||||
GST_LOG_OBJECT (ffmpegdec, "get output buffer");
|
GST_LOG_OBJECT (ffmpegdec, "get output buffer");
|
||||||
|
|
||||||
|
if (!ffmpegdec->output_state)
|
||||||
|
goto not_negotiated;
|
||||||
|
|
||||||
ret =
|
ret =
|
||||||
gst_video_decoder_allocate_output_frame (GST_VIDEO_DECODER (ffmpegdec),
|
gst_video_decoder_allocate_output_frame (GST_VIDEO_DECODER (ffmpegdec),
|
||||||
frame);
|
frame);
|
||||||
|
@ -1167,9 +1170,14 @@ get_output_buffer (GstFFMpegVidDec * ffmpegdec, GstVideoCodecFrame * frame)
|
||||||
/* special cases */
|
/* special cases */
|
||||||
alloc_failed:
|
alloc_failed:
|
||||||
{
|
{
|
||||||
GST_DEBUG_OBJECT (ffmpegdec, "pad_alloc failed");
|
GST_DEBUG_OBJECT (ffmpegdec, "allocation failed");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
not_negotiated:
|
||||||
|
{
|
||||||
|
GST_DEBUG_OBJECT (ffmpegdec, "not negotiated");
|
||||||
|
return GST_FLOW_NOT_NEGOTIATED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue