Message ID | 20230217170249.8148-5-ffmpeg@gyani.pro |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,v3,1/5] avformat: add av_program_add_stream_index2() | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavformat/tee.c b/libavformat/tee.c index cb555f52fd..a917cb0244 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -295,6 +295,14 @@ FF_ENABLE_DEPRECATION_WARNINGS } } + for (i = 0; i < avf->nb_programs; i++) { + ret = av_program_copy(avf2, (const AVFormatContext *)avf, avf->programs[i]->id, 0); + if (ret < 0) { + av_log(avf, AV_LOG_WARNING, "unable to transfer program %d to child muxer\n", avf->programs[i]->id); + break; + } + } + ret = ff_format_output_open(avf2, filename, &options); if (ret < 0) { av_log(avf, AV_LOG_ERROR, "Slave '%s': error opening: %s\n", slave,