Message ID | 20230207145850.25485-4-ffmpeg@gyani.pro |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/4] avformat: add av_program_copy() | 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 dd408dd096..fd1b17ce7c 100644 --- a/libavformat/tee.c +++ b/libavformat/tee.c @@ -291,6 +291,12 @@ static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave) } } + for (i = 0; i < avf->nb_programs; i++) { + ret = av_program_copy(avf2, avf, avf->programs[i]->id); + if (ret < 0) + av_log(avf, AV_LOG_WARNING, "unable to transfer program %d to child muxer\n", avf->programs[i]->id); + } + ret = ff_format_output_open(avf2, filename, &options); if (ret < 0) { av_log(avf, AV_LOG_ERROR, "Slave '%s': error opening: %s\n", slave,