Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/3] avcodec/packet: add a define for the max buffer size a packet can hold
@ 2023-06-21 20:46 James Almer
  2023-06-21 20:46 ` [FFmpeg-devel] [PATCH 2/3] avcodec: use AV_PKT_MAX_PAYLOAD_SIZE James Almer
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: James Almer @ 2023-06-21 20:46 UTC (permalink / raw)
  To: ffmpeg-devel

Signed-off-by: James Almer <jamrial@gmail.com>
---
TODO: Version bump and APIchanges entry.

 libavcodec/packet.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/packet.h b/libavcodec/packet.h
index f28e7e7011..f7dd687c23 100644
--- a/libavcodec/packet.h
+++ b/libavcodec/packet.h
@@ -418,6 +418,11 @@ typedef struct AVPacket {
     AVRational time_base;
 } AVPacket;
 
+/**
+ * Max size for an AVPacket data buffer.
+ */
+#define AV_PKT_MAX_PAYLOAD_SIZE ((size_t)(INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE))
+
 #if FF_API_INIT_PACKET
 attribute_deprecated
 typedef struct AVPacketList {
-- 
2.41.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-27 14:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-21 20:46 [FFmpeg-devel] [PATCH 1/3] avcodec/packet: add a define for the max buffer size a packet can hold James Almer
2023-06-21 20:46 ` [FFmpeg-devel] [PATCH 2/3] avcodec: use AV_PKT_MAX_PAYLOAD_SIZE James Almer
2023-06-21 20:46 ` [FFmpeg-devel] [PATCH 3/3] avformat: " James Almer
2023-06-27  7:23 ` [FFmpeg-devel] [PATCH 1/3] avcodec/packet: add a define for the max buffer size a packet can hold Anton Khirnov
2023-06-27 14:39   ` James Almer

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git