X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fbitstream.c;h=8762e5f4b2fecf370af6256c63b530031a344838;hb=b429c86d84cfc964c84bc68ec56799802de2b25a;hp=ed528fe4af7d1d75eafe537467fd3ee881bc3796;hpb=a12063b118ad05409ff775ba30fab00265ad3031;p=ffmpeg diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index ed528fe4af7..8762e5f4b2f 100644 --- a/libavcodec/bitstream.c +++ b/libavcodec/bitstream.c @@ -164,7 +164,7 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes, table_size = 1 << table_nb_bits; if (table_nb_bits > 30) - return -1; + return AVERROR(EINVAL); table_index = alloc_table(vlc, table_size, flags & INIT_VLC_USE_NEW_STATIC); ff_dlog(NULL, "new table index=%d size=%d\n", table_index, table_size); if (table_index < 0) @@ -306,7 +306,7 @@ int ff_init_vlc_sparse(VLC *vlc_arg, int nb_bits, int nb_codes, av_log(NULL, AV_LOG_ERROR, "Too long VLC (%d) in init_vlc\n", buf[j].bits);\ if (!(flags & INIT_VLC_USE_NEW_STATIC)) \ av_free(buf); \ - return -1; \ + return AVERROR(EINVAL); \ } \ GET_DATA(buf[j].code, codes, i, codes_wrap, codes_size); \ if (buf[j].code >= (1LL<