[FFmpeg-cvslog] avcodec: clarify documentation of CODEC_CAP_DELAY

Michael Niedermayer michaelni at gmx.at
Fri Oct 21 13:39:42 CEST 2011


On Fri, Oct 21, 2011 at 01:24:45PM +0200, Reimar Döffinger wrote:
> On Fri, Oct 21, 2011 at 12:17:25PM +0200, Michael Niedermayer wrote:
> > On Fri, Oct 21, 2011 at 10:18:31AM +0200, Reimar Döffinger wrote:
> > > 
> > > 
> > > On 21 Oct 2011, at 02:37, git at videolan.org (Justin Ruggles) wrote:
> > > 
> > > > ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sun Sep 25 17:05:34 2011 -0400| [ffeeae923b03b2b923d58a3c2e00f728ceaf5f87] | committer: Justin Ruggles
> > > > 
> > > > avcodec: clarify documentation of CODEC_CAP_DELAY
> > > > 
> > > >> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ffeeae923b03b2b923d58a3c2e00f728ceaf5f87
> > > > ---
> > > > 
> > > > libavcodec/avcodec.h |    6 ++++--
> > > > 1 files changed, 4 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> > > > index 06cede9..2e735f9 100644
> > > > --- a/libavcodec/avcodec.h
> > > > +++ b/libavcodec/avcodec.h
> > > > @@ -674,8 +674,10 @@ typedef struct RcOverride{
> > > > /* Codec can export data for HW decoding (XvMC). */
> > > > #define CODEC_CAP_HWACCEL         0x0010
> > > > /**
> > > > - * Codec has a nonzero delay and needs to be fed with NULL at the end to get the delayed data.
> > > > - * If this is not set, the codec is guaranteed to never be fed with NULL data.
> > > > + * Codec has a nonzero delay and needs to be fed with avpkt->data=NULL,
> > > > + * avpkt->size=0 at the end to get the delayed data until the decoder no longer
> > > > + * returns frames. If this is not set, the codec is guaranteed to never be fed
> > > > + * with NULL data.
> > > 
> > > I have the feeling MPlayer doesn't respect that last bit.
> > > Can't we just handle that in the decode functions?
> > 
> > We do since a long time
> > if((avctx->codec->capabilities & CODEC_CAP_DELAY) || avpkt->size || (avctx->active_thread_type&FF_THREAD_FRAME)){
> >     ...
> 
> Oh. I realize I misread the comment, so forget it (unless someone has a
> suggestion to improve it?).

i think the user app view vs. codec view should be made more clear
especially in a public header

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20111021/001def5e/attachment.asc>


More information about the ffmpeg-cvslog mailing list