Audio streams are only added when a packet is read. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> --- The mov demuxer is different from all the other users of DV: It does not use its main AVFormatContext for this, but a separate one. Therefore the new audio streams are not added to the mov context and so it does not need this flag (and it is not added for it). But there is a problem with this approach: If there are multiple DV audio streams included in this DV stream, the packets will all have the same stream number.
Furthermore I don't see anything that prevents to overwrite and leak the mov context's dv context in case multiple DV streams are present. But I also don't have a sample showing a leak. libavformat/dv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/dv.c b/libavformat/dv.c index d7909683c3..62c20f6a00 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -343,6 +343,9 @@ static int dv_init_demux(AVFormatContext *s, DVDemuxContext *c) c->vst->codecpar->bit_rate = 25000000; c->vst->start_time = 0; + /* Audio streams are added later as they are encountered. */ + s->ctx_flags |= AVFMTCTX_NOHEADER; + return 0; } -- 2.30.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".