[FFmpeg-devel] [PATCH 3/8] Prevent svq3_get_ue_golomb() from returning a negative value.

fenrir at elivagar.org fenrir at elivagar.org
Sat Sep 17 16:56:31 CEST 2011


From: Laurent Aimar <fenrir at videolan.org>

---
 libavcodec/golomb.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h
index 83d277f..58707ed 100644
--- a/libavcodec/golomb.h
+++ b/libavcodec/golomb.h
@@ -124,7 +124,7 @@ static inline int svq3_get_ue_golomb(GetBitContext *gb){
         }
 
         CLOSE_READER(re, gb);
-        return ret - 1;
+        return (ret - 1) & INT_MAX;
     }
 }
 
-- 
1.7.2.5



More information about the ffmpeg-devel mailing list