On Tue, Sep 8, 2015 at 8:27 PM, wm4 <[email protected]> wrote: > The generic code in utils.c sets the AVFrame.pkt_dts field from the > packet it was supposedly decoded. This does not have to be true for a > fully asynchronous decoder like mmaldec. It could be overwritten with an > incorrect value. Even if the decoder doesn't determine the DTS (but sets > it to AV_NOPTS_VALUE), it's impossible to determine a correct value in > utils.c. > > Decoders can now be marked with FF_CODEC_CAP_SETS_PKT_DTS, in which case > utils.c won't overwrite the field. The decoders are expected to set this > field (even if they only set it to AV_NOPTS_VALUE). > --- > libavcodec/internal.h | 5 ++++- > libavcodec/mmaldec.c | 1 + > libavcodec/utils.c | 3 ++- > 3 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/internal.h b/libavcodec/internal.h > index fc90632..3ef70b7 100644 > --- a/libavcodec/internal.h > +++ b/libavcodec/internal.h > @@ -46,7 +46,10 @@ > * all. > */ > #define FF_CODEC_CAP_INIT_CLEANUP (1 << 1) > - > +/** > + * whether the decoder sets AVFrame.pkt_dts itself > + */ > +#define FF_CODEC_CAP_SETS_PKT_DTS (1 << 2)
Could you extend documentation here? Just copying the second part of the commit log should be plenty. Thank you -- Vittorio _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
