]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/cabac_functions.h
ffmpeg: change command line option -dump to work without -loglevel debug
[ffmpeg] / libavcodec / cabac_functions.h
index bcd1dee972a25a98dbb86bc73dee5c8b7ab94f4c..31c919bd711c0830a1641761a19f7c0554bddbbb 100644 (file)
@@ -74,7 +74,8 @@ static inline void renorm_cabac_decoder_once(CABACContext *c){
 
 #ifndef get_cabac_inline
 static void refill2(CABACContext *c){
-    int i, x;
+    int i;
+    unsigned x;
 
     x= c->low ^ (c->low-1);
     i= 7 - ff_h264_norm_shift[x>>(CABAC_BITS-1)];
@@ -190,7 +191,8 @@ static av_unused const uint8_t* skip_bytes(CABACContext *c, int n) {
 #endif
     if ((int) (c->bytestream_end - ptr) < n)
         return NULL;
-    ff_init_cabac_decoder(c, ptr + n, c->bytestream_end - ptr - n);
+    if (ff_init_cabac_decoder(c, ptr + n, c->bytestream_end - ptr - n) < 0)
+        return NULL;
 
     return ptr;
 }