[FFmpeg-cvslog] avcodec/golomb: Document return for get_ur_golomb_jpegls() and get_sr_golomb_flac()
Michael Niedermayer
git at videolan.org
Sun Jan 5 01:28:29 EET 2025
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Fri Jul 5 02:21:45 2024 +0200| [12c1072179bc936bd33cd63df0c7f9a55d9b8270] | committer: Michael Niedermayer
avcodec/golomb: Document return for get_ur_golomb_jpegls() and get_sr_golomb_flac()
Found while reviewing code related to CID1604409 Overflowed return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 7cf5b83f6fa367f99aefc1321bafc0a7e8db33cd)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=12c1072179bc936bd33cd63df0c7f9a55d9b8270
---
libavcodec/golomb.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h
index 5136a04845..c37e6c408b 100644
--- a/libavcodec/golomb.h
+++ b/libavcodec/golomb.h
@@ -301,6 +301,8 @@ static inline int get_ur_golomb(GetBitContext *gb, int k, int limit,
/**
* read unsigned golomb rice code (jpegls).
+ *
+ * @returns -1 on error
*/
static inline int get_ur_golomb_jpegls(GetBitContext *gb, int k, int limit,
int esc_len)
@@ -373,6 +375,8 @@ static inline int get_sr_golomb(GetBitContext *gb, int k, int limit,
/**
* read signed golomb rice code (flac).
+ *
+ * @returns INT_MIN on error
*/
static inline int get_sr_golomb_flac(GetBitContext *gb, int k, int limit,
int esc_len)
More information about the ffmpeg-cvslog
mailing list