summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-12-16 10:33:38 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-12-18 23:22:59 +0100
commitc63dd3f0a48a9f6389d253597ab51caddc0118db (patch)
tree9450a9b6deedebbbdb9d5f3968033184e83de16e /libavcodec
parent3beb9cbad35218ed1fb3473eeb3cfc97a931bff4 (diff)
downloadffmpeg-streaming-c63dd3f0a48a9f6389d253597ab51caddc0118db.zip
ffmpeg-streaming-c63dd3f0a48a9f6389d253597ab51caddc0118db.tar.gz
a64multi: check elbg return values
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/a64multienc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c
index 786074f..d742dee 100644
--- a/libavcodec/a64multienc.c
+++ b/libavcodec/a64multienc.c
@@ -321,8 +321,14 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
buf = pkt->data;
/* calc optimal new charset + charmaps */
- ff_init_elbg(meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx);
- ff_do_elbg (meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx);
+ ret = ff_init_elbg(meta, 32, 1000 * c->mc_lifetime, best_cb,
+ CHARSET_CHARS, 50, charmap, &c->randctx);
+ if (ret < 0)
+ return ret;
+ ret = ff_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);
OpenPOWER on IntegriCloud