]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/bitstream.c
avcodec/float2half: fix minor style issue
[ffmpeg] / libavcodec / bitstream.c
index 4ce49fd51cf823b38b78cfe9d3c2078d412eecf6..e425ffdc96473034c78c4844ba8be3234189f93c 100644 (file)
@@ -104,10 +104,10 @@ void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
         v = *(const uint16_t *)ptr;                         \
         break;                                              \
     case 4:                                                 \
+    default:                                                \
+        av_assert1(size == 4);                              \
         v = *(const uint32_t *)ptr;                         \
         break;                                              \
-    default:                                                \
-        av_assert1(0);                                      \
     }                                                       \
 }
 
@@ -281,9 +281,9 @@ static int vlc_common_end(VLC *vlc, int nb_bits, int nb_codes, VLCcode *codes,
     int ret = build_table(vlc, nb_bits, nb_codes, codes, flags);
 
     if (flags & INIT_VLC_USE_NEW_STATIC) {
-        if(vlc->table_size != vlc->table_allocated)
+        if (vlc->table_size != vlc->table_allocated &&
+            !(flags & (INIT_VLC_STATIC_OVERLONG & ~INIT_VLC_USE_NEW_STATIC)))
             av_log(NULL, AV_LOG_ERROR, "needed %d had %d\n", vlc->table_size, vlc->table_allocated);
-
         av_assert0(ret >= 0);
         *vlc_arg = *vlc;
     } else {