From 194be1f43ea391eb986732707435176e579265aa Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 18 May 2014 12:12:59 +0200 Subject: lavf: switch to AVStream.time_base as the hint for the muxer timebase Previously, AVStream.codec.time_base was used for that purpose, which was quite confusing for the callers. This change also opens the path for removing AVStream.codec. The change in the lavf-mkv test is due to the native timebase (1/1000) being used instead of the default one (1/90000), so the packets are now sent to the crc muxer in the same order in which they are demuxed (previously some of them got reordered because of inexact timestamp conversion). --- libavformat/avformat.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libavformat/avformat.h') diff --git a/libavformat/avformat.h b/libavformat/avformat.h index b17c791eac..473b8daedf 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -710,9 +710,12 @@ typedef struct AVStream { * of which frame timestamps are represented. * * decoding: set by libavformat - * encoding: set by libavformat in avformat_write_header. The muxer may use the - * user-provided value of @ref AVCodecContext.time_base "codec->time_base" - * as a hint. + * encoding: May be set by the caller before avformat_write_header() to + * provide a hint to the muxer about the desired timebase. In + * avformat_write_header(), the muxer will overwrite this field + * with the timebase that will actually be used for the timestamps + * written into the file (which may or may not be related to the + * user-provided one, depending on the format). */ AVRational time_base; -- cgit v1.2.3