1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

libschroedingerdec: don't produce empty frames

They are not valid and can cause problems/crashes for API users.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
Andreas Cadhalpun 2016-11-13 23:24:45 +01:00 committed by Vittorio Giovara
parent d3da8a0035
commit 8c3a643808

View File

@ -307,7 +307,7 @@ static int libschroedinger_decode_frame(AVCodecContext *avctx,
/* Grab next frame to be returned from the top of the queue. */
framewithpts = ff_schro_queue_pop(&p_schro_params->dec_frame_queue);
if (framewithpts && framewithpts->frame) {
if (framewithpts && framewithpts->frame && framewithpts->frame->components[0].stride) {
if (ff_get_buffer(avctx, avframe, 0) < 0) {
av_log(avctx, AV_LOG_ERROR, "Unable to allocate buffer\n");
return AVERROR(ENOMEM);