[FFmpeg-cvslog] fraps: check overread per sample instead of per line

Michael Niedermayer git at videolan.org
Wed Nov 9 20:11:50 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Nov  9 19:40:59 2011 +0100| [82a1d575757d5bc9b0b218fe89c77f8de06a7d39] | committer: Michael Niedermayer

fraps: check overread per sample instead of per line

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=82a1d575757d5bc9b0b218fe89c77f8de06a7d39
---

 libavcodec/fraps.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index ebcc101..bcce97c 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -112,12 +112,12 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
              */
             if(j) dst[i] += dst[i - stride];
             else if(Uoff) dst[i] += 0x80;
+            if(get_bits_left(&gb) < 0){
+                free_vlc(&vlc);
+                return -1;
+            }
         }
         dst += stride;
-        if(get_bits_left(&gb) < 0){
-            free_vlc(&vlc);
-            return -1;
-        }
     }
     free_vlc(&vlc);
     return 0;



More information about the ffmpeg-cvslog mailing list