[FFmpeg-devel] [PATCH] avcodec: Allow user applications to provide non padded input buffers
Michael Niedermayer
michaelni at gmx.at
Thu Jan 15 02:00:30 CET 2015
On Thu, Jan 15, 2015 at 01:58:40AM +0100, Michael Niedermayer wrote:
> This can be extended easily to skip the buffer growing for codecs which do
> not need it.
>
> The added field or a equivalent change is needed as the AVBuffer
> size might not match the actually allocated and saftely accessable
> memory
>
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
> libavcodec/avcodec.h | 16 ++++++++++++++++
> libavcodec/utils.c | 19 ++++++++++++++++++-
> 2 files changed, 34 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 99467bb..ed0bee0 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -3128,6 +3128,18 @@ typedef struct AVCodecContext {
> * - decoding: set by user through AVOPtions (NO direct access)
> */
> char *codec_whitelist;
> +
> + /**
> + * Allocated input size
> + * If this is 0 then it is assumed the user allocated size + FF_INPUT_BUFFER_PADDING_SIZE.
> + * Note, many decoders need the padding and will copy/reallocate the buffer
> + * if insufficient padding is provided.
> + * Currently only supported for video.
> + * This also requires the
removed this stray line locally
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 1
"Used only once" - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150115/214c3b12/attachment.asc>
More information about the ffmpeg-devel
mailing list