Message ID | 20230218044949.1179-4-ffmpeg@gyani.pro |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,v4,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/segment.c b/libavformat/segment.c index 2a82f39f31..d7f3fb5deb 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -186,6 +186,14 @@ FF_ENABLE_DEPRECATION_WARNINGS } } + for (i = 0; i < s->nb_programs; i++) { + ret = av_program_copy(oc, (const AVFormatContext *)s, s->programs[i]->id, 0); + if (ret < 0) { + av_log(s, AV_LOG_ERROR, "unable to transfer program %d to child muxer\n", s->programs[i]->id); + return ret; + } + } + return 0; }