diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-08-20 11:51:48 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-06 20:30:57 +0100 |
commit | 8fecba0aa7e3f74b753cba18119e72b6f1211874 (patch) | |
tree | 185377d87d53e3633e6229c8badd899bf9a9d41a /libavcodec/vp8.c | |
parent | 04acafdc7c36f18c03ff424f1db8a76fa705c112 (diff) | |
download | ffmpeg-8fecba0aa7e3f74b753cba18119e72b6f1211874.tar.gz |
avcodec/vp5/6/8: use vpX_rac_is_end()
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ab56e62e8f7e02760cfc883956511cab32393315)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1dd89192c59df0d6655e9308a0782d8c7b259b18)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r-- | libavcodec/vp8.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 3adecba2f0..8a3f3e4f1a 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -605,7 +605,7 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si s->fade_present = vp8_rac_get(c); } - if (c->end <= c->buffer && c->bits >= 0) + if (vpX_rac_is_end(c)) return AVERROR_INVALIDDATA; /* E. Fading information for previous frame */ if (s->fade_present && vp8_rac_get(c)) { @@ -2300,7 +2300,7 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void curframe->tf.f->data[2] + 8 * mb_y * s->uvlinesize }; - if (c->end <= c->buffer && c->bits >= 0) + if (vpX_rac_is_end(c)) return AVERROR_INVALIDDATA; if (mb_y == 0) @@ -2331,7 +2331,7 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void s->mv_max.x = ((s->mb_width - 1) << 6) + MARGIN; for (mb_x = 0; mb_x < s->mb_width; mb_x++, mb_xy++, mb++) { - if (c->end <= c->buffer && c->bits >= 0) + if (vpX_rac_is_end(c)) return AVERROR_INVALIDDATA; // Wait for previous thread to read mb_x+2, and reach mb_y-1. if (prev_td != td) { |