summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/golomb.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libffmpeg/libavcodec/golomb.h')
-rw-r--r--src/libffmpeg/libavcodec/golomb.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/libffmpeg/libavcodec/golomb.h b/src/libffmpeg/libavcodec/golomb.h
index a8221ec29..9bf7aec46 100644
--- a/src/libffmpeg/libavcodec/golomb.h
+++ b/src/libffmpeg/libavcodec/golomb.h
@@ -3,18 +3,20 @@
* Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
* Copyright (c) 2004 Alex Beregszaszi
*
- * This library is free software; you can redistribute it and/or
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
@@ -443,6 +445,10 @@ static inline void set_ur_golomb_jpegls(PutBitContext *pb, int i, int k, int lim
if(k)
put_bits(pb, k, i&((1<<k)-1));
}else{
+ while(limit > 31) {
+ put_bits(pb, 31, 0);
+ limit -= 31;
+ }
put_bits(pb, limit , 1);
put_bits(pb, esc_len, i - 1);
}