[SCM] libav/experimental: cdgraphics: do not return 0 from the decode function

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:04:14 UTC 2014


The following commit has been merged in the experimental branch:
commit c7d9b473e28238d4a4ef1b7e8b42c1cca256da36
Author: Anton Khirnov <anton at khirnov.net>
Date:   Wed Aug 6 10:56:34 2014 +0000

    cdgraphics: do not return 0 from the decode function
    
    0 means no data consumed, so it can trigger an infinite loop in the
    caller.
    
    CC:libav-stable at libav.org

diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c
index 752003f..c3e42e7 100644
--- a/libavcodec/cdgraphics.c
+++ b/libavcodec/cdgraphics.c
@@ -349,10 +349,9 @@ static int cdg_decode_frame(AVCodecContext *avctx,
         *got_frame = 1;
     } else {
         *got_frame = 0;
-        buf_size   = 0;
     }
 
-    return buf_size;
+    return avpkt->size;
 }
 
 static av_cold int cdg_decode_end(AVCodecContext *avctx)

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list