aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg_mux.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-07-25 16:28:07 +0200
committerAnton Khirnov <anton@khirnov.net>2023-08-30 11:53:46 +0200
commit8ecbb1f9af6b9d2e0deb07c6be80b0ed9c50548f (patch)
tree1a332e309eb03fa74410231e1db5d689afa9afcc /fftools/ffmpeg_mux.h
parented5caaaf221bda5b4efbe8a3631d0a3438b0d32c (diff)
downloadffmpeg-8ecbb1f9af6b9d2e0deb07c6be80b0ed9c50548f.tar.gz
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.
Diffstat (limited to 'fftools/ffmpeg_mux.h')
-rw-r--r--fftools/ffmpeg_mux.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fftools/ffmpeg_mux.h b/fftools/ffmpeg_mux.h
index 7f34b86548..a2bb4dfc7d 100644
--- a/fftools/ffmpeg_mux.h
+++ b/fftools/ffmpeg_mux.h
@@ -75,7 +75,7 @@ typedef struct MuxStream {
int64_t stream_duration;
AVRational stream_duration_tb;
- // audio streamcopy - state for av_rescale_delta()
+ // state for av_rescale_delta() call for audio in write_packet()
int64_t ts_rescale_delta_last;
// combined size of all the packets sent to the muxer