]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/golomb.h
ffv1: add 1 status byte to slices in in case crcs are stored too.
[ffmpeg] / libavcodec / golomb.h
index 2f474be22e5a7142fd12bbc73afa82f03438b53c..32e53a456fccc63d61a5dff5d2d114edcccbf6ef 100644 (file)
@@ -135,7 +135,7 @@ static inline int svq3_get_ue_golomb(GetBitContext *gb){
             ret = (ret << 4) | ff_interleaved_dirac_golomb_vlc_code[buf];
             UPDATE_CACHE(re, gb);
             buf = GET_CACHE(re, gb);
-        } while(ret<0x8000000U);
+        } while (ret<0x8000000U && HAVE_BITS_REMAINING(re, gb));
 
         CLOSE_READER(re, gb);
         return ret - 1;