summaryrefslogtreecommitdiff
path: root/libavcodec/hevcdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-24 14:46:18 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-24 22:17:15 +0200
commit2476067680334b147f72930a5e7c3ad7668de4a8 (patch)
treeaf1638391906fd634d0750f0b115c74b20cea216 /libavcodec/hevcdec.c
parent933aa91e31d5cbf9dbc0cf416a988e6011bc4a40 (diff)
avcodec/hevcdec: Use error path if init_get_bits8() fails
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/hevcdec.c')
-rw-r--r--libavcodec/hevcdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 83130fc48f..f4114fd993 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -2419,9 +2419,9 @@ static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *input_ctb_row, int
if(ctb_row) {
ret = init_get_bits8(&lc->gb, s->data + s->sh.offset[ctb_row - 1], s->sh.size[ctb_row - 1]);
-
if (ret < 0)
- return ret;
+ goto error;
+
ret = ff_init_cabac_decoder(&lc->cc, s->data + s->sh.offset[(ctb_row)-1], s->sh.size[ctb_row - 1]);
if (ret < 0)
goto error;