]> git.sesse.net Git - ffmpeg/commitdiff
Disallow VLC coding with more than 8 bits as there are several bugs
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 22 Mar 2010 21:12:31 +0000 (21:12 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 22 Mar 2010 21:12:31 +0000 (21:12 +0000)
in that code that could lead to broken files.
AC coding is unaffected.

Originally committed as revision 22638 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/ffv1.c

index 2efe7e192e94ddebaeedfc02a0c532949a2ccc45..e3b71f7bb19d291968a4e7cf1731d54b642416b6 100644 (file)
@@ -673,6 +673,10 @@ static av_cold int encode_init(AVCodecContext *avctx)
             av_log(avctx, AV_LOG_ERROR, "bits_per_raw_sample invalid\n");
             return -1;
         }
+        if(!s->ac){
+            av_log(avctx, AV_LOG_ERROR, "bits_per_raw_sample of more than 8 needs -coder 1 currently\n");
+            return -1;
+        }
         s->version= 1;
     case PIX_FMT_YUV444P:
     case PIX_FMT_YUV422P: