]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/faxcompr.c
Add av_shrink_packet function for use in av_get_packet that reduces pkt->size
[ffmpeg] / libavcodec / faxcompr.c
index 424de599b540d23bd2840080e9b5d36936cc4b1b..087197e97c71871ba9391b9941f5467aee882b51 100644 (file)
@@ -21,7 +21,7 @@
 
 /**
  * CCITT Fax Group 3 and 4 decompression
- * @file faxcompr.c
+ * @file libavcodec/faxcompr.c
  * @author Konstantin Shishkov
  */
 #include "avcodec.h"
@@ -95,7 +95,7 @@ static const uint8_t ccitt_group3_2d_lens[11] = {
 
 static VLC ccitt_vlc[2], ccitt_group3_2d_vlc;
 
-av_cold void ff_ccitt_unpack_init()
+av_cold void ff_ccitt_unpack_init(void)
 {
     static VLC_TYPE code_table1[528][2];
     static VLC_TYPE code_table2[648][2];
@@ -212,10 +212,7 @@ static int decode_group3_2d_line(AVCodecContext *avctx, GetBitContext *gb,
             return -1;
         }else{//vertical mode
             run = run_off - offs + (cmode - 5);
-            if(cmode >= 5)
-                run_off += *ref++;
-            else
-                run_off -= *--ref;
+            run_off -= *--ref;
             offs += run;
             if(offs > width || run > width){
                 av_log(avctx, AV_LOG_ERROR, "Run went out of bounds\n");