summaryrefslogtreecommitdiff
path: root/libavformat/internal.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-18 05:23:54 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-23 14:23:49 +0100
commit4a9eb7072c6d9a6b30fdddec2cd1f251665d2a77 (patch)
tree64652d5a54a71e56acf206334115842ecbfe5460 /libavformat/internal.h
parente375e09d8230ce356ff0b5b29f2ed355d375fda0 (diff)
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.h12
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;