[FFmpeg-devel] [PATCH 11/11] avformat/internal: Remove packet for extract_extradata

Hendrik Leppkes h.leppkes at gmail.com
Fri Aug 16 12:04:51 EEST 2019


On Fri, Aug 16, 2019 at 5:22 AM Andreas Rheinhardt
<andreas.rheinhardt at gmail.com> wrote:
>
> The effective lifetime of the packet does not extend beyond the
> extract_extradata in libavformat/utils.c, so the packet can simply be
> put on the stack there. This allows to remove the allocation and the
> corresponding frees.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
>  libavformat/internal.h |  1 -
>  libavformat/utils.c    | 10 +---------
>  2 files changed, 1 insertion(+), 10 deletions(-)
>

AVPacket is defined in avcodec, as such using it outside of avcodec on
the stack feels rather iffy, as we try to get users to stop doing that
and unlock the size of AVPacket from the ABI.

- Hendrik


More information about the ffmpeg-devel mailing list