aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-08 22:56:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-08 22:56:51 +0200
commit3d6635749ab2f3507a73cb450038118ae561d74c (patch)
tree093587124b2f247ed01845eae72ac4159a9d3c65
parent77510a96986176b1be791944861e3a6e44abd3d1 (diff)
parent6308cd4868d2bd5fdf8bfa8dd10856c9a91874f5 (diff)
downloadffmpeg-3d6635749ab2f3507a73cb450038118ae561d74c.tar.gz
Merge commit '6308cd4868d2bd5fdf8bfa8dd10856c9a91874f5'
* commit '6308cd4868d2bd5fdf8bfa8dd10856c9a91874f5': mov: Check memory allocation Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mov.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index bc5743a78f..5ea6932801 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1851,7 +1851,11 @@ static int mov_finalize_stsd_codec(MOVContext *c, AVIOContext *pb,
switch (st->codec->codec_id) {
#if CONFIG_DV_DEMUXER
case AV_CODEC_ID_DVAUDIO:
- c->dv_fctx = avformat_alloc_context();
+ c->dv_fctx = avformat_alloc_context();
+ if (!c->dv_fctx) {
+ av_log(c->fc, AV_LOG_ERROR, "dv demux context alloc error\n");
+ return AVERROR(ENOMEM);
+ }
c->dv_demux = avpriv_dv_init_demux(c->dv_fctx);
if (!c->dv_demux) {
av_log(c->fc, AV_LOG_ERROR, "dv demux context init error\n");