]> git.sesse.net Git - ffmpeg/commitdiff
libschroedingerdec: don't produce empty frames
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Sun, 13 Nov 2016 22:24:45 +0000 (23:24 +0100)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Thu, 8 Dec 2016 20:53:58 +0000 (15:53 -0500)
They are not valid and can cause problems/crashes for API users.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/libschroedingerdec.c

index f173f92f043b68605bb88742ea5e587399498a7a..56b2f6d778a771c567aa16522b1e46d1c4cf8c4a 100644 (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);