1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avplay: Check format allocation inside decode_thread()

CC: libav-stable@libav.org
Bug-Id: CID 1265718
This commit is contained in:
Vittorio Giovara 2015-02-04 14:21:01 +00:00
parent 266f241193
commit 733f4b05f0

View File

@ -2257,6 +2257,11 @@ static int decode_thread(void *arg)
global_video_state = is; global_video_state = is;
ic = avformat_alloc_context(); 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; ic->interrupt_callback.callback = decode_interrupt_cb;
err = avformat_open_input(&ic, is->filename, is->iformat, &format_opts); err = avformat_open_input(&ic, is->filename, is->iformat, &format_opts);
if (err < 0) { if (err < 0) {