X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fasvenc.c;h=3cc94bf91a291276d21ca0005c1687bc8af8bde6;hb=9d6be83085ccb1f52b923064eb93566ddbb0a1f7;hp=c4eca2a13d6aee1bef02b2d51eb827717ecceb0c;hpb=8822e2b9543bb02fb2889dff627b6db023053253;p=ffmpeg diff --git a/libavcodec/asvenc.c b/libavcodec/asvenc.c index c4eca2a13d6..3cc94bf91a2 100644 --- a/libavcodec/asvenc.c +++ b/libavcodec/asvenc.c @@ -173,10 +173,7 @@ static inline int encode_mb(ASV1Context *a, int16_t block[6][64]) { int i; - if (a->pb.buf_end - a->pb.buf - (put_bits_count(&a->pb) >> 3) < MAX_MB_SIZE) { - av_log(a->avctx, AV_LOG_ERROR, "encoded frame too large\n"); - return -1; - } + av_assert0(a->pb.buf_end - a->pb.buf - (put_bits_count(&a->pb) >> 3) >= MAX_MB_SIZE); if (a->avctx->codec_id == AV_CODEC_ID_ASV1) { for (i = 0; i < 6; i++)