mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
fftools/ffmpeg_mux: set stream duration after the timebase is certainly known
Stop assuming the encoder knows the muxing timebase, which does not always have to hold (e.g. due to bitstream filters).
This commit is contained in:
parent
ba1141d8a9
commit
57021a68d9
4 changed files with 14 additions and 8 deletions
|
|
@ -666,6 +666,11 @@ int of_stream_init(OutputFile *of, OutputStream *ost)
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (ms->stream_duration) {
|
||||
ost->st->duration = av_rescale_q(ms->stream_duration, ms->stream_duration_tb,
|
||||
ost->st->time_base);
|
||||
}
|
||||
|
||||
ost->initialized = 1;
|
||||
|
||||
return mux_check_init(mux);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue