mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-05 15:00:35 +00:00
avformat/tee: relay programs to child muxers
This commit is contained in:
parent
1b82e58a3a
commit
7fc335cb27
1 changed files with 8 additions and 0 deletions
|
|
@ -294,6 +294,14 @@ static int open_slave(AVFormatContext *avf, char *slave, TeeSlave *tee_slave)
|
|||
}
|
||||
}
|
||||
|
||||
for (unsigned 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_ERROR, "unable to transfer program %d to child muxer\n", avf->programs[i]->id);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ret = ff_format_output_open(avf2, filename, &options);
|
||||
if (ret < 0) {
|
||||
av_log(avf, AV_LOG_ERROR, "Slave '%s': error opening: %s\n", slave,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue