diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-19 04:21:13 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-19 04:21:13 +0100 |
commit | ff4f2036defbadc60081ba252e093abda5897d6d (patch) | |
tree | 4458b6baaf4cfcca3ff27ff8785f3aff3fd6d755 /libavcodec | |
parent | bb7ad47ddf94511eece7e243402e2cf95cddf1df (diff) | |
parent | c63dd3f0a48a9f6389d253597ab51caddc0118db (diff) | |
download | ffmpeg-ff4f2036defbadc60081ba252e093abda5897d6d.tar.gz |
Merge commit 'c63dd3f0a48a9f6389d253597ab51caddc0118db'
* commit 'c63dd3f0a48a9f6389d253597ab51caddc0118db':
a64multi: check elbg return values
Conflicts:
libavcodec/a64multienc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/a64multienc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c index fc00d3fc62..6438c27fd5 100644 --- a/libavcodec/a64multienc.c +++ b/libavcodec/a64multienc.c @@ -340,8 +340,14 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt, buf = pkt->data; /* calc optimal new charset + charmaps */ - avpriv_init_elbg(meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx); - avpriv_do_elbg (meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx); + ret = avpriv_init_elbg(meta, 32, 1000 * c->mc_lifetime, best_cb, + CHARSET_CHARS, 50, charmap, &c->randctx); + if (ret < 0) + return ret; + ret = avpriv_do_elbg(meta, 32, 1000 * c->mc_lifetime, best_cb, + CHARSET_CHARS, 50, charmap, &c->randctx); + if (ret < 0) + return ret; /* create colorram map and a c64 readable charset */ render_charset(avctx, charset, colram); |