diff options
author | Paul B Mahol <onemda@gmail.com> | 2017-02-03 20:25:53 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-02-03 20:25:53 +0100 |
commit | 7ecdc03ea3da6acdf756bb689f159b053c2b8b0b (patch) | |
tree | 1f715b8596b1bab3cc995686ade4c160d065f1f1 /libavcodec | |
parent | f09afb4a90b2ee14577b4bedc9f16ac2b5dfcf72 (diff) | |
download | ffmpeg-streaming-7ecdc03ea3da6acdf756bb689f159b053c2b8b0b.zip ffmpeg-streaming-7ecdc03ea3da6acdf756bb689f159b053c2b8b0b.tar.gz |
avcodec/xsubdec: use init_get_bits8()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/xsubdec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/xsubdec.c b/libavcodec/xsubdec.c index b024535..2a766b3 100644 --- a/libavcodec/xsubdec.c +++ b/libavcodec/xsubdec.c @@ -53,7 +53,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVSubtitle *sub = data; const uint8_t *buf_end = buf + buf_size; uint8_t *bitmap; - int w, h, x, y, i; + int w, h, x, y, i, ret; int64_t packet_time = 0; GetBitContext gb; int has_alpha = avctx->codec_tag == MKTAG('D','X','S','A'); @@ -145,7 +145,8 @@ FF_ENABLE_DEPRECATION_WARNINGS #endif // process RLE-compressed data - init_get_bits(&gb, buf, (buf_end - buf) * 8); + if ((ret = init_get_bits8(&gb, buf, buf_end - buf)) < 0) + return ret; bitmap = sub->rects[0]->data[0]; for (y = 0; y < h; y++) { // interlaced: do odd lines |