diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-07-29 22:00:31 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-18 01:46:44 +0200 |
commit | 056a8fc07133148f6cb1f2ea157a6b91c33e5b02 (patch) | |
tree | 52b0f686c72fa3bfe3ecaad8b5bf8a1af320babb /libavcodec/smacker.c | |
parent | e028e8aa39a430568b486751cf82b3a26e24e7af (diff) | |
download | ffmpeg-056a8fc07133148f6cb1f2ea157a6b91c33e5b02.tar.gz |
avcodec/smacker: Forward error codes
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/smacker.c')
-rw-r--r-- | libavcodec/smacker.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index 07fa8887d8..9ba70af6f7 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -653,18 +653,15 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, goto error; } skip_bits1(&gb); - if (smacker_decode_tree(&gb, &h[i], 0, 0) < 0) { - ret = AVERROR_INVALIDDATA; + if ((ret = smacker_decode_tree(&gb, &h[i], 0, 0)) < 0) goto error; - } skip_bits1(&gb); if(h[i].current > 1) { - res = init_vlc(&vlc[i], SMKTREE_BITS, h[i].length, + ret = init_vlc(&vlc[i], SMKTREE_BITS, h[i].length, h[i].lengths, sizeof(int), sizeof(int), h[i].bits, sizeof(uint32_t), sizeof(uint32_t), INIT_VLC_LE); - if(res < 0) { + if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "Cannot build VLC table\n"); - ret = AVERROR_INVALIDDATA; goto error; } } |