History

avcodec/xsubdec: use init_get_bits8()

Paul B Mahol committed 9 years ago

Commit 7ecdc031 parent f09afb41 file · +3 −2Browse files

Unified · Split

libavcodec/xsubdec.c+3−2
@@ -53,7 +53,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 52 unmodified lines
53 AVSubtitle *sub = data;53 AVSubtitle *sub = data;
54 const uint8_t *buf_end = buf + buf_size;54 const uint8_t *buf_end = buf + buf_size;
55 uint8_t *bitmap;55 uint8_t *bitmap;
56 int w, h, x, y, i;56 int w, h, x, y, i, ret;
57 int64_t packet_time = 0;57 int64_t packet_time = 0;
58 GetBitContext gb;58 GetBitContext gb;
59 int has_alpha = avctx->codec_tag == MKTAG('D','X','S','A');59 int has_alpha = avctx->codec_tag == MKTAG('D','X','S','A');
@@ -145,7 +145,8 @@ FF_ENABLE_DEPRECATION_WARNINGS · 85 unmodified lines
145#endif145#endif
146 146
147 // process RLE-compressed data147 // process RLE-compressed data
148 init_get_bits(&gb, buf, (buf_end - buf) * 8);148 if ((ret = init_get_bits8(&gb, buf, buf_end - buf)) < 0)
149 return ret;
149 bitmap = sub->rects[0]->data[0];150 bitmap = sub->rects[0]->data[0];
150 for (y = 0; y < h; y++) {151 for (y = 0; y < h; y++) {
151 // interlaced: do odd lines152 // interlaced: do odd lines

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t