ffmpeg | branch: master | Anton Khirnov <an...@khirnov.net> | Wed Aug 31 
04:43:22 2022 +0200| [693c1e631c4957acd2fe9d9650d757fd8d3d1239] | committer: 
Anton Khirnov

lavf/mov: avoid leaks with multiple dv-audio streams

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=693c1e631c4957acd2fe9d9650d757fd8d3d1239
---

 libavformat/mov.c | 5 +++++
 1 file changed, 5 insertions(+)

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

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to