Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-08-31 05:43:22 +0300
committerAnton Khirnov <anton@khirnov.net>2022-09-05 09:14:36 +0300
commit693c1e631c4957acd2fe9d9650d757fd8d3d1239 (patch)
treec7ea89cab22d4eb2e07873e8232d8afeb1a3c24a /libavformat/mov.c
parent1ef4620290bcea29097a79c3f27be3d5cb366687 (diff)
lavf/mov: avoid leaks with multiple dv-audio streams
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index b93facf7e0..a1bc627991 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2431,6 +2431,11 @@ static int mov_finalize_stsd_codec(MOVContext *c, AVIOContext *pb,
switch (st->codecpar->codec_id) {
#if CONFIG_DV_DEMUXER
case AV_CODEC_ID_DVAUDIO:
+ if (c->dv_fctx) {
+ avpriv_request_sample(c->fc, "multiple DV audio streams");
+ return AVERROR(ENOSYS);
+ }
+
c->dv_fctx = avformat_alloc_context();
if (!c->dv_fctx) {
av_log(c->fc, AV_LOG_ERROR, "dv demux context alloc error\n");