Re: [FFmpeg-devel] [PATCH] avcodec/utils: document allocation requirement of extradata
On 8/25/2018 5:15 PM, Michael Niedermayer wrote: On Fri, Aug 24, 2018 at 08:53:29PM +0200, Timo Rothenpieler wrote: --- libavcodec/avcodec.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 31e50d5a94..2c5e78c88d 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1616,6 +1616,7 @@ typedef struct AVCodecContext { * The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger * than extradata_size to avoid problems if it is read with the bitstream reader. * The bytewise contents of extradata must not depend on the architecture or CPU endianness. + * Must be allocated with the av_malloc() family of functions. * - encoding: Set/allocated/freed by libavcodec. * - decoding: Set/allocated/freed by user. */ LGTM thx applied ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/utils: document allocation requirement of extradata
On Fri, Aug 24, 2018 at 08:53:29PM +0200, Timo Rothenpieler wrote: > --- > libavcodec/avcodec.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > index 31e50d5a94..2c5e78c88d 100644 > --- a/libavcodec/avcodec.h > +++ b/libavcodec/avcodec.h > @@ -1616,6 +1616,7 @@ typedef struct AVCodecContext { > * The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes > larger > * than extradata_size to avoid problems if it is read with the > bitstream reader. > * The bytewise contents of extradata must not depend on the > architecture or CPU endianness. > + * Must be allocated with the av_malloc() family of functions. > * - encoding: Set/allocated/freed by libavcodec. > * - decoding: Set/allocated/freed by user. > */ LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Dictatorship naturally arises out of democracy, and the most aggravated form of tyranny and slavery out of the most extreme liberty. -- Plato signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avcodec/utils: document allocation requirement of extradata
--- libavcodec/avcodec.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 31e50d5a94..2c5e78c88d 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1616,6 +1616,7 @@ typedef struct AVCodecContext { * The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger * than extradata_size to avoid problems if it is read with the bitstream reader. * The bytewise contents of extradata must not depend on the architecture or CPU endianness. + * Must be allocated with the av_malloc() family of functions. * - encoding: Set/allocated/freed by libavcodec. * - decoding: Set/allocated/freed by user. */ -- 2.17.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/utils: document allocation requirement of extradata
On 8/24/2018 2:59 PM, Timo Rothenpieler wrote: > --- > libavcodec/avcodec.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > index 31e50d5a94..5ec7a2430b 100644 > --- a/libavcodec/avcodec.h > +++ b/libavcodec/avcodec.h > @@ -1616,6 +1616,7 @@ typedef struct AVCodecContext { > * The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes > larger > * than extradata_size to avoid problems if it is read with the > bitstream reader. > * The bytewise contents of extradata must not depend on the > architecture or CPU endianness. > + * Must be allocated with av_malloc() in any case. Use "Must be allocated with the av_malloc() family of functions" instead. That's what's used in the doxy for other functions. > * - encoding: Set/allocated/freed by libavcodec. > * - decoding: Set/allocated/freed by user. > */ > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avcodec/utils: document allocation requirement of extradata
--- libavcodec/avcodec.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 31e50d5a94..5ec7a2430b 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1616,6 +1616,7 @@ typedef struct AVCodecContext { * The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger * than extradata_size to avoid problems if it is read with the bitstream reader. * The bytewise contents of extradata must not depend on the architecture or CPU endianness. + * Must be allocated with av_malloc() in any case. * - encoding: Set/allocated/freed by libavcodec. * - decoding: Set/allocated/freed by user. */ -- 2.17.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel