[FFmpeg-devel] [PATCH] Vorbis-in-Ogg: Do not set timebase to invalid values
Thu Feb 10 20:45:48 CET 2011
On Thu, Feb 10, 2011 at 01:49:27PM -0500, Justin Ruggles wrote:
> > So do I have this right:
> > - AVStream->time_base is the time_base of timestamps expected by the
> > muxer, or output by the demuxer
> > - for encoding, AVCodecContext->time_base is the time_base for the
> > packets written by the application
> > - for decoding, AVCodecContext->time_base is a copy of AVStream->time_base?
> > Shouldn't we mark AVCodecContext->time_base as unused during decoding
> > then? It's unclear to me how it's different from AVStream->time_base
> > during decoding.
> But it apparently is used during decoding, and I don't think it is
> always a copy of the stream time_base. Just grep libavcodec/* for
> "time_base" and look at the decoders that use it.
No, when you think about decoding it's not the same.
For H.264, MPEG-4 etc. the raw video stream has a time base and timing
information etc., but for mkv etc. there is also a time base/timing
info in the container.
That is why there are two. And applications might have different
opinions as to which they want to believe.
But that is only relevant when also decoding, and does not explain the
point of using both in _libavformat_.
More information about the ffmpeg-devel