summaryrefslogtreecommitdiff
path: root/ffmpeg.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-05-27 12:04:29 +0200
committerwm4 <nfxjfg@googlemail.com>2017-03-03 08:45:43 +0100
commit4ee5aed122ba7d289c1686eca6eba161d5d62304 (patch)
tree3daf3a3d530b96a8958a02d2b5ed38c58de18f18 /ffmpeg.h
parent33580a8625c77591919b6155a48da04dccc8d398 (diff)
ffmpeg: do packet ts rescaling in write_packet()
This will be useful in the following commit, after which the muxer timebase is not always available when encoding. This merges Libav commit 3e265ca. It was previously skipped. There are some changes with how/when the mux_timebase field is set, because the Libav approach often causes a too imprecise time base to be set. This is hard, because the muxer's write_header function can readjust the timebase, at which point we might already have encoded packets buffered. (It might be better to buffer them after the encoder, instead of after all the timestamp handling logic before muxing.) The two FATE tests change because the output time base is raised for subtitles. (Needed to avoid certain rounding issues in other cases.) Includes a minor merge fix by Mark Thompson, and avconv: Move rescale to stream timebase before monotonisation also by Mark Thompson <sw@jkqxz.net>. Signed-off-by: wm4 <nfxjfg@googlemail.com>
Diffstat (limited to 'ffmpeg.h')
-rw-r--r--ffmpeg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffmpeg.h b/ffmpeg.h
index 458bb8a3dc..ca35ccc260 100644
--- a/ffmpeg.h
+++ b/ffmpeg.h
@@ -446,6 +446,8 @@ typedef struct OutputStream {
int64_t first_pts;
/* dts of the last packet sent to the muxer */
int64_t last_mux_dts;
+ // the timebase of the packets sent to the muxer
+ AVRational mux_timebase;
int nb_bitstream_filters;
uint8_t *bsf_extradata_updated;