Browse Source

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

tags/n2.1
Carl Eugen Hoyos 12 years ago
parent
commit
c9eb5c9751
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/utils.c

+ 2
- 0
libavformat/utils.c View File

@@ -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);


Loading…
Cancel
Save