[FFmpeg-devel] [PATCH 1/2] decode: add ff_decode_skip_samples function
Anton Khirnov
anton at khirnov.net
Sat Nov 4 12:41:14 EET 2023
Quoting Lynne (2023-10-30 06:09:28)
> This is a convenience function, which is required to be called by decoders
> needing to skip samples every time.
> It automatically creates and increments side data.
>
> The idea is to get rid of skip_samples eventually and replace it with this
> function.
>
> Patch attached.
>
>
> From 41dfcbbacfa9232d2308d0229dcd172309b32f9f Mon Sep 17 00:00:00 2001
> From: Lynne <dev at lynne.ee>
> Date: Mon, 30 Oct 2023 05:38:17 +0100
> Subject: [PATCH 1/2] decode: add ff_decode_skip_samples function
>
> This is a convenience function, which is required to be called by decoders
> needing to skip samples every time.
> It automatically creates and increments side data.
>
> The idea is to get rid of skip_samples eventually and replace it with this
> function.
> ---
> libavcodec/decode.c | 18 ++++++++++++++++++
> libavcodec/decode.h | 9 +++++++++
> 2 files changed, 27 insertions(+)
>
> diff --git a/libavcodec/decode.c b/libavcodec/decode.c
> index ad39021354..f971723ff7 100644
> --- a/libavcodec/decode.c
> +++ b/libavcodec/decode.c
> @@ -299,6 +299,24 @@ static int64_t guess_correct_pts(AVCodecContext *ctx,
> return pts;
> }
>
> +int ff_decode_skip_samples(AVCodecContext *avctx, AVFrame *frame, uint32_t base_skip, uint32_t additional)
avctx seems unused.
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list