diff options
author | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2008-06-01 16:25:05 +0000 |
---|---|---|
committer | Panagiotis Issaris <takis.issaris@uhasselt.be> | 2008-06-01 16:25:05 +0000 |
commit | 437fd77b055059f3bbf407d364dd319880b7141e (patch) | |
tree | fa9b75dc83dae2c162198fd9d8da2023396a87c9 /libavformat/rmdec.c | |
parent | 934b910ba0d06eca9135455ccf835c62e0ba596c (diff) | |
download | ffmpeg-437fd77b055059f3bbf407d364dd319880b7141e.tar.gz |
Check whether the memory allocation for extradata succeeded. Fixes issue 472.
Originally committed as revision 13603 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rmdec.c')
-rw-r--r-- | libavformat/rmdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index c4bda1fa63..a2aa9c8cd1 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -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); |