[FFmpeg-devel] [PATCH 11/11] avformat/internal: Remove packet for extract_extradata
Andreas Rheinhardt
andreas.rheinhardt at gmail.com
Sat Aug 17 03:33:00 EEST 2019
Hendrik Leppkes:
> 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
Ok, if it is the consensus that sizeof(AVPacket) should eventually not
be public API any more, then this patch makes no sense of course. So
I'll drop it.
- Andreas
More information about the ffmpeg-devel
mailing list