aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dcadec.h
diff options
context:
space:
mode:
authorfoo86 <foobaz86@gmail.com>2017-07-10 17:11:40 +0300
committerJames Almer <jamrial@gmail.com>2017-07-18 21:04:58 -0300
commit012620aa1b40b0642e3081871059a1be98411df4 (patch)
tree3967cb2f558b93363756ee302c2e07103fe42f4a /libavcodec/dcadec.h
parent902cd30e9b72d3ad5dfe01b27e3dd0928ad88562 (diff)
downloadffmpeg-012620aa1b40b0642e3081871059a1be98411df4.tar.gz
avcodec/dca: avoid using bitstream reader in a non-standard way
Use proper get_bits.h functions instead of directly accessing index. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/dcadec.h')
-rw-r--r--libavcodec/dcadec.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dcadec.h b/libavcodec/dcadec.h
index 456f3c433b..9da8d3b444 100644
--- a/libavcodec/dcadec.h
+++ b/libavcodec/dcadec.h
@@ -88,9 +88,9 @@ static inline int ff_dca_check_crc(AVCodecContext *avctx, GetBitContext *s,
static inline int ff_dca_seek_bits(GetBitContext *s, int p)
{
- if (p < s->index || p > s->size_in_bits)
+ if (p < get_bits_count(s) || p > s->size_in_bits)
return -1;
- s->index = p;
+ skip_bits_long(s, p - get_bits_count(s));
return 0;
}