Commit c9eb5c97 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

lavf/utils.c: Avoid a null pointer dereference on oom after duration_error allocation.

parent 2e6338b4
......@@ -2857,6 +2857,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
if (!st->info->duration_error)
st->info->duration_error = av_mallocz(sizeof(st->info->duration_error[0])*2);
if (!st->info->duration_error)
return AVERROR(ENOMEM);
// if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
// av_log(NULL, AV_LOG_ERROR, "%f\n", dts);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment