[SCM] libav/experimental: seems only 3 bits are used for the number of resolutions, some rv30 files have this set to 10 even though there are just 2 resolutions in the extradata

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:51:15 UTC 2013


The following commit has been merged in the experimental branch:
commit 0d415b2dd7e2aa607c464ef98ed0788a70d33885
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Sat Sep 30 16:00:27 2006 +0000

    seems only 3 bits are used for the number of resolutions, some rv30 files have this set to 10 even though there are just 2 resolutions in the extradata
    
    Originally committed as revision 6395 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index 63d2942..adda0e8 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -433,7 +433,7 @@ static int rv20_decode_picture_header(MpegEncContext *s)
 
     if(s->avctx->has_b_frames){
         int f, new_w, new_h;
-        int v= s->avctx->extradata_size >= 4 ? ((uint8_t*)s->avctx->extradata)[1] : 0;
+        int v= s->avctx->extradata_size >= 4 ? 7&((uint8_t*)s->avctx->extradata)[1] : 0;
 
         if (get_bits(&s->gb, 1)){
             av_log(s->avctx, AV_LOG_ERROR, "unknown bit3 set\n");

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list