History

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.

Nicolas Gaullier committed 2 years ago

Commit ee9ae4e1 parent c14573a2 files · +1 −2Browse files

Unified · Split

2 files
  1. fftools/ffmpeg_mux_init.c +0 −1
  2. tests/ref/fate/time_base +1 −1
fftools/ffmpeg_mux_init.c+0−1
@@ -1012,7 +1012,6 @@ static int streamcopy_init(const Muxer *mux, OutputStream *ost, AVDictionary **e · 1011 unmodified lines
10121012 else
10131013 sar = par->sample_aspect_ratio;
10141014 ost->st->sample_aspect_ratio = par->sample_aspect_ratio = sar;
1015− ost->st->avg_frame_rate = ist->st->avg_frame_rate;
10161015 ost->st->r_frame_rate = ist->st->r_frame_rate;
10171016 break;
10181017 }
tests/ref/fate/time_base+1−1
@@ -1 +1 @@
1−b28d4ca13029fdc80a114b56467be9d7
1+69ffc45e19ab070bc3e964d7b718fe53

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t