diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-03-18 05:23:54 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-03-23 14:23:49 +0100 |
commit | 4a9eb7072c6d9a6b30fdddec2cd1f251665d2a77 (patch) | |
tree | 64652d5a54a71e56acf206334115842ecbfe5460 /libavformat/internal.h | |
parent | e375e09d8230ce356ff0b5b29f2ed355d375fda0 (diff) | |
download | ffmpeg-4a9eb7072c6d9a6b30fdddec2cd1f251665d2a77.tar.gz |
avformat/utils: Don't allocate separate packet for extract_extradata
One can simply reuse AVFormatInternal.parse_pkt instead.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/internal.h')
-rw-r--r-- | libavformat/internal.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libavformat/internal.h b/libavformat/internal.h index 3c6b2921c1..a810d51bba 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -90,9 +90,18 @@ struct AVFormatInternal { /** * Packets split by the parser get queued here. */ - AVPacket *parse_pkt; struct PacketList *parse_queue; struct PacketList *parse_queue_end; + /** + * The generic code uses this as a temporary packet + * to parse packets; it may also be used for other means + * for short periods that are guaranteed not to overlap + * with calls to av_read_frame() (or ff_read_packet()) + * or with each other. + * Every user has to ensure that this packet is blank + * after using it. + */ + AVPacket *parse_pkt; /** * Used to hold temporary packets. @@ -190,7 +199,6 @@ struct AVStreamInternal { * supported) */ struct { AVBSFContext *bsf; - AVPacket *pkt; int inited; } extract_extradata; |