Browse Source

Check whether the memory allocation for extradata succeeded. Fixes issue 472.

Originally committed as revision 13603 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Panagiotis Issaris 17 years ago
parent
commit
437fd77b05
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/rmdec.c

+ 2
- 0
libavformat/rmdec.c View File

@@ -235,6 +235,8 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVStream *st)
return -1;
}
st->codec->extradata= av_mallocz(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)
return AVERROR(ENOMEM);
get_buffer(pb, st->codec->extradata, st->codec->extradata_size);

// av_log(NULL, AV_LOG_DEBUG, "fps= %d fps2= %d\n", fps, fps2);


Loading…
Cancel
Save