]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mjpegdec.c
mjpeg: interlaced buggy avid fix
[ffmpeg] / libavcodec / mjpegdec.c
index b2e063fb4b5ba4bfc03644faa1e6a91272d5e770..4a5b04672df870f693bde4472bb13f78102ec931 100644 (file)
@@ -1122,9 +1122,8 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
             s->buggy_avid = 1;
 //        if (s->first_picture)
 //            printf("mjpeg: workarounding buggy AVID\n");
-        i = get_bits(&s->gb, 8);
-        if     (i==2) s->bottom_field= 1;
-        else if(i==1) s->bottom_field= 0;
+        i = get_bits(&s->gb, 8); len--;
+        av_log(s->avctx, AV_LOG_DEBUG, "polarity %d\n", i);
 #if 0
         skip_bits(&s->gb, 8);
         skip_bits(&s->gb, 32);
@@ -1447,10 +1446,6 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx,
 
                     s->restart_count = 0;
                     /* nothing to do on SOI */
-                    if (s->got_picture) {
-                        av_log(avctx, AV_LOG_WARNING, "EOI missing, emulating\n");
-                        goto eoi_parser;
-                    }
                     break;
                 case DQT:
                     ff_mjpeg_decode_dqt(s);