aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-11-08 19:24:57 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-03-04 21:39:42 +0100
commitf497731260d42e920318ca745a8146febb9e055e (patch)
tree69cfb85b96f71ec085f3da2e18da64af195c019e
parentc72b5be9e353563b22e7617f9abd14f97ff50f33 (diff)
downloadffmpeg-f497731260d42e920318ca745a8146febb9e055e.tar.gz
fftools/ffmpeg_opt: Apply copyinkf for all stream types
The earlier code has ignored it for all stream types except video and subtitles, probably because audio was presumed to only consist of keyframes. Yet this assumption is not true for e.g. TrueHD. Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--fftools/ffmpeg_opt.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 50f0edd332..f983c74a66 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1611,6 +1611,9 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
if (!ost->muxing_queue)
exit_program(1);
+ MATCH_PER_STREAM_OPT(copy_initial_nonkeyframes, i,
+ ost->copy_initial_nonkeyframes, oc, st);
+
return ost;
}
@@ -1917,8 +1920,6 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
ost->last_frame = av_frame_alloc();
if (!ost->last_frame)
exit_program(1);
- } else {
- MATCH_PER_STREAM_OPT(copy_initial_nonkeyframes, i, ost->copy_initial_nonkeyframes, oc ,st);
}
if (ost->stream_copy)
@@ -2046,8 +2047,6 @@ static OutputStream *new_subtitle_stream(OptionsContext *o, AVFormatContext *oc,
subtitle_enc->codec_type = AVMEDIA_TYPE_SUBTITLE;
- MATCH_PER_STREAM_OPT(copy_initial_nonkeyframes, i, ost->copy_initial_nonkeyframes, oc, st);
-
if (!ost->stream_copy) {
char *frame_size = NULL;