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

(cherry picked from commit c9eb5c9751)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Carl Eugen Hoyos
2013-07-10 13:15:57 +02:00
committed by Michael Niedermayer
parent a7315116dd
commit fc3dec8b62

View File

@@ -2859,6 +2859,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);