[FFmpeg-cvslog] fftools/ffmpeg: Fix honor -r output option with streamcopy
Nicolas Gaullier
git at videolan.org
Wed Sep 4 14:10:55 EEST 2024
ffmpeg | branch: master | Nicolas Gaullier <nicolas.gaullier at cji.paris> | Tue Sep 3 10:02:30 2024 +0200| [ee9ae4e8ba167b52267aa3e35d8fc2770316769f] | committer: Anton Khirnov
fftools/ffmpeg: Fix honor -r output option with streamcopy
Fix "ost->st->avg_frame_rate = ost->frame_rate" in streamcopy_init()
being reset to input's frame rate a few lines below.
Note that in current code, there are some discrepancies amongst the
muxers. For example, avienc relies on time_base, so it is not affected
by this patch, whereas mxfenc and matroskaenc do use avg_frame_rate,
so this patch fixes -r being honored.
In the updated fate test, the input is (wrongly) probed as 50fps. With
this patch, the correct value (25fps) is successfully forced with -r.
Signed-off-by: Nicolas Gaullier <nicolas.gaullier at cji.paris>
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ee9ae4e8ba167b52267aa3e35d8fc2770316769f
---
fftools/ffmpeg_mux_init.c | 1 -
tests/ref/fate/time_base | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c
index e84fa9719f..37d626add6 100644
--- a/fftools/ffmpeg_mux_init.c
+++ b/fftools/ffmpeg_mux_init.c
@@ -1012,7 +1012,6 @@ static int streamcopy_init(const Muxer *mux, OutputStream *ost, AVDictionary **e
else
sar = par->sample_aspect_ratio;
ost->st->sample_aspect_ratio = par->sample_aspect_ratio = sar;
- ost->st->avg_frame_rate = ist->st->avg_frame_rate;
ost->st->r_frame_rate = ist->st->r_frame_rate;
break;
}
diff --git a/tests/ref/fate/time_base b/tests/ref/fate/time_base
index 23875d1fb8..ae96232e60 100644
--- a/tests/ref/fate/time_base
+++ b/tests/ref/fate/time_base
@@ -1 +1 @@
-b28d4ca13029fdc80a114b56467be9d7
+69ffc45e19ab070bc3e964d7b718fe53
More information about the ffmpeg-cvslog
mailing list