diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2016-11-13 23:24:45 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-12-08 15:53:58 -0500 |
commit | 8c3a643808fc89c8003478ea952187cd9fe5d27a (patch) | |
tree | 0fec198d827294d5398df7dd25dfaf82d8a97c9f | |
parent | d3da8a0035734529c4e26696c9a0c6cb56633838 (diff) | |
download | ffmpeg-8c3a643808fc89c8003478ea952187cd9fe5d27a.tar.gz |
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>
-rw-r--r-- | libavcodec/libschroedingerdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/libschroedingerdec.c b/libavcodec/libschroedingerdec.c index f173f92f04..56b2f6d778 100644 --- a/libavcodec/libschroedingerdec.c +++ b/libavcodec/libschroedingerdec.c @@ -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); |