changeset 10610:cf7af348a11a libavcodec

slif aka "SoftLab MPEG-2 I-frames Codec" support. Flipping one bit still is popular it seems as a means to create a new codec. fixes issue1469.
author michael
date Tue, 01 Dec 2009 02:07:46 +0000
parents f864e7927dff
children eb37707704e4
files mpeg12.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mpeg12.c	Tue Dec 01 01:01:37 2009 +0000
+++ b/mpeg12.c	Tue Dec 01 02:07:46 2009 +0000
@@ -1694,6 +1694,9 @@
 
     s->mb_x=0;
 
+    if(mb_y==0 && s->codec_tag == AV_RL32("SLIF")){
+        skip_bits1(&s->gb);
+    }else{
     for(;;) {
         int code = get_vlc2(&s->gb, mbincr_vlc.table, MBINCR_VLC_BITS, 2);
         if (code < 0){
@@ -1710,6 +1713,8 @@
             break;
         }
     }
+    }
+
     if(s->mb_x >= (unsigned)s->mb_width){
         av_log(s->avctx, AV_LOG_ERROR, "initial skip overflow\n");
         return -1;