mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-11-03 01:33:50 +08:00
fftools/ffmpeg_mux: stop rescaling timestamps in of_streamcopy()
This function converts packet timestamps from the input stream timebase to OutputStream.mux_timebase, which may or may not be equal to the actual output AVStream timebase (and even when it is, this may not always be the optimal choice due to bitstream filtering). Just keep the timestamps in input stream timebase, they will be rescaled as needed before bitstream filtering and/or sending the packet to the muxer. Move the av_rescale_delta() call for audio (needed to preserve accuracy with coarse demuxer timebases) to write_packet. Drop now-unused OutputStream.mux_timebase.
This commit is contained in:
@@ -463,8 +463,6 @@ int enc_open(OutputStream *ost, AVFrame *frame)
|
||||
if (ost->st->time_base.num <= 0 || ost->st->time_base.den <= 0)
|
||||
ost->st->time_base = av_add_q(ost->enc_ctx->time_base, (AVRational){0, 1});
|
||||
|
||||
ost->mux_timebase = enc_ctx->time_base;
|
||||
|
||||
ret = of_stream_init(of, ost);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user