summaryrefslogtreecommitdiff
path: root/libavcodec/asvenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-12-31 18:29:34 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-01-01 21:11:47 +0100
commit6747a63397596b7c8b096ea396163dd494313a2a (patch)
treec757beedba33eb5308cb9c038f7739d7e6abbd11 /libavcodec/asvenc.c
parent9520d51e21f9aa5adc807b0b89322bd822b06738 (diff)
avcodec/asvenc: Replace bitstream space check by assert
This should never be untrue, if it is, thats a bug Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/asvenc.c')
-rw-r--r--libavcodec/asvenc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/asvenc.c b/libavcodec/asvenc.c
index c4eca2a13d..3cc94bf91a 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++)