[FFmpeg-devel] [PATCH 3/3] avcodec/internal: Document how to avoid the internal->byte_buffer with ff_alloc_packet2()
Michael Niedermayer
michaelni at gmx.at
Tue Jul 7 18:51:40 CEST 2015
On Mon, Jul 06, 2015 at 12:13:41PM +0200, Hendrik Leppkes wrote:
> On Mon, Jul 6, 2015 at 12:07 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> > libavcodec/internal.h | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/libavcodec/internal.h b/libavcodec/internal.h
> > index 2feb68b..c410f8b 100644
> > --- a/libavcodec/internal.h
> > +++ b/libavcodec/internal.h
> > @@ -210,6 +210,9 @@ int avpriv_unlock_avformat(void);
> > * or allocated in this function.
> > *
> > * @param avctx the AVCodecContext of the encoder
> > + * this can be set to NULL to avoid the use of internal->byte_buffer
> > + * in the allocation algorithm. When the final used size is well
> > + * known it is more efficient to not use internal->byte_buffer.
> > * @param avpkt the AVPacket
> > * If avpkt->data is already set, avpkt->size is checked
> > * to ensure it is large enough.
>
> This seems terrible. Can't it somehow be made smarter?
> Passing a NULL context is hardly intuitive or obvious.
i can add a flag to the function arguments if you think thats better?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150707/db3236bf/attachment.sig>
More information about the ffmpeg-devel
mailing list