]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/faxcompr.c
Merge commit 'fb722a900fc5cc9e003b9fef25b27ed7fc5547a2'
[ffmpeg] / libavcodec / faxcompr.c
index 57e92bee428ea737c28620cb5807a0d517d5ee79..e7f9d00a115ccd2e133008845003bc2be291b570 100644 (file)
@@ -228,7 +228,7 @@ static int decode_group3_2d_line(AVCodecContext *avctx, GetBitContext *gb,
             mode = !mode;
         }
         //sync line pointers
-        while(run_off <= offs){
+        while(offs < width && run_off <= offs){
             run_off += *ref++;
             run_off += *ref++;
         }
@@ -291,7 +291,8 @@ int ff_ccitt_unpack(AVCodecContext *avctx,
     ref[1] = 0;
     ref[2] = 0;
     init_get_bits(&gb, src, srcsize*8);
-    has_eol = show_bits(&gb, 12) == 1;
+    has_eol = show_bits(&gb, 12) == 1 || show_bits(&gb, 16) == 1;
+
     for(j = 0; j < height; j++){
         runend = runs + runsize;
         if(compr == TIFF_G4){