projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62cc7a9
)
rtjpeg: Use init_get_bits8
author
Luca Barbato
<lu_zero@gentoo.org>
Tue, 13 Aug 2013 05:05:28 +0000
(07:05 +0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Tue, 13 Aug 2013 12:04:55 +0000
(14:04 +0200)
CC:libav-stable@libav.org
libavcodec/rtjpeg.c
patch
|
blob
|
history
diff --git
a/libavcodec/rtjpeg.c
b/libavcodec/rtjpeg.c
index
9fab681
..
f5abe63
100644
(file)
--- a/
libavcodec/rtjpeg.c
+++ b/
libavcodec/rtjpeg.c
@@
-107,10
+107,13
@@
int ff_rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f,
const uint8_t *buf, int buf_size) {
GetBitContext gb;
int w = c->w / 16, h = c->h / 16;
- int x, y;
+ int x, y
, ret
;
uint8_t *y1 = f->data[0], *y2 = f->data[0] + 8 * f->linesize[0];
uint8_t *u = f->data[1], *v = f->data[2];
- init_get_bits(&gb, buf, buf_size * 8);
+
+ if ((ret = init_get_bits8(&gb, buf, buf_size)) < 0)
+ return ret;
+
for (y = 0; y < h; y++) {
for (x = 0; x < w; x++) {
#define BLOCK(quant, dst, stride) do { \