On 5/31/2020 1:38 PM, James Almer wrote:
> Signed-off-by: James Almer <jamr...@gmail.com>
> ---
> Aside from being more correct, it's also needed now that the video_enc_params
> API, which may allocate arrays > INT_MAX, is used as frame side data.
> 
>  doc/APIchanges              |  4 ++++
>  libavutil/buffer.c          | 25 +++++++++++++++++++++++++
>  libavutil/buffer.h          | 31 +++++++++++++++++++++++++++++++
>  libavutil/buffer_internal.h | 13 +++++++++++++
>  libavutil/version.h         |  3 +++
>  5 files changed, 76 insertions(+)

[...]

> +#if FF_API_BUFFER_SIZE_T
>  AVBufferPool *av_buffer_pool_init2(int size, void *opaque,
>                                     AVBufferRef* (*alloc)(void *opaque, int 
> size),
> +#else
> +AVBufferPool *av_buffer_pool_init2(size_t size, void *opaque,
> +                                   AVBufferRef* (*alloc)(void *opaque, 
> size_t size),
> +#endif
>                                     void (*pool_free)(void *opaque))
>  {
>      AVBufferPool *pool = av_mallocz(sizeof(*pool));
> @@ -236,7 +257,11 @@ AVBufferPool *av_buffer_pool_init2(int size, void 
> *opaque,
>      return pool;
>  }
>  
> +#if FF_API_BUFFER_SIZE_T
>  AVBufferPool *av_buffer_pool_init(int size, AVBufferRef* (*alloc)(int size))
> +#else
> +AVBufferPool *av_buffer_pool_init(size_t size, AVBufferRef* (*alloc)(size_t 
> size))

These two pool alloc functions are the ones that make me think we may
need to let two years pass before making the switch. Library users
implementing their own callbacks will need to adapt them.

I'll for that matter resend the AVPacket patch later, changing only the
side data parts.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to