On 01/06/2012 07:12 PM, Ronald S. Bultje wrote: > Hi, > > On Fri, Jan 6, 2012 at 2:50 PM, Justin Ruggles <[email protected]> > wrote: >> One thing I'm unsure about is whether or not it would be a good idea >> to add a codec capability to indicate that the output packet will >> always have the same pts and duration as the input frame (or the >> opposite case). > > Aren't you saying the inverse of CODEC_CAP_DELAY? We can reuse that flag.
The two cases do sometimes, but not necessarily always, go hand-in-hand. For some it's not necessarily required. For example, some encoders only set the delay flag to encode an extra frame at the end due to MDCT overlap (where each sample is supposed to be covered in 2 MDCT windows). The frames themselves still have a constant duration, and sending of output packets is not delayed. And FLAC, for example, uses CODEC_CAP_DELAY to update the extradata at the end of encoding, which can't be done at close because it needs to be done before av_write_trailer(). That said, if it simplifies things, I would be ok with reusing CODEC_CAP_DELAY. We could just force encoders using that flag to always set pts and duration, whether or not it's absolutely necessary. -Justin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
