diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-02-04 14:21:01 +0000 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-02-17 11:27:41 -0500 |
commit | 733f4b05f0e120ddd0393b23f2b6d9106cf922e4 (patch) | |
tree | 1d70523d90669810fc58b1552744220ad121a517 | |
parent | 266f241193b2fa8c99bb8b1f007c66bedd3b7d97 (diff) | |
download | ffmpeg-733f4b05f0e120ddd0393b23f2b6d9106cf922e4.tar.gz |
avplay: Check format allocation inside decode_thread()
CC: libav-stable@libav.org
Bug-Id: CID 1265718
-rw-r--r-- | avplay.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -2257,6 +2257,11 @@ static int decode_thread(void *arg) global_video_state = is; ic = avformat_alloc_context(); + if (!ic) { + av_log(NULL, AV_LOG_FATAL, "Could not allocate context.\n"); + ret = AVERROR(ENOMEM); + goto fail; + } ic->interrupt_callback.callback = decode_interrupt_cb; err = avformat_open_input(&ic, is->filename, is->iformat, &format_opts); if (err < 0) { |