diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2014-08-31 21:39:22 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2014-09-01 19:41:20 +0200 |
commit | 36c0043344fd6d99e92f42cfd1d718a9272ad632 (patch) | |
tree | e9a85e51e26709fb50b545f20e3c246167fee378 /libavcodec/h261dec.c | |
parent | 2a00812d82c5f8a76328597c8b5ee1d4cd9c49dc (diff) | |
download | ffmpeg-36c0043344fd6d99e92f42cfd1d718a9272ad632.tar.gz |
h261dec, ituh263dec: ensure CLOSE_READER is done on error paths, too.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/h261dec.c')
-rw-r--r-- | libavcodec/h261dec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index c9470b1296..9b95775efd 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -310,6 +310,7 @@ static int h261_decode_block(H261Context *h, int16_t *block, int n, int coded) UPDATE_CACHE(re, &s->gb); GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TCOEFF_VLC_BITS, 2, 0); if (run == 66 && level) { + CLOSE_READER(re, &s->gb); av_log(s->avctx, AV_LOG_ERROR, "illegal ac vlc code at %dx%d\n", s->mb_x, s->mb_y); return -1; @@ -332,6 +333,7 @@ static int h261_decode_block(H261Context *h, int16_t *block, int n, int coded) } i += run; if (i >= 64) { + CLOSE_READER(re, &s->gb); av_log(s->avctx, AV_LOG_ERROR, "run overflow at %dx%d\n", s->mb_x, s->mb_y); return -1; |