[FFmpeg-cvslog] avformat/argo_asf: add ASF_MIN_BUFFER_SIZE #define
Zane van Iperen
git at videolan.org
Mon Sep 14 07:42:40 EEST 2020
ffmpeg | branch: master | Zane van Iperen <zane at zanevaniperen.com> | Fri Sep 4 13:54:09 2020 +1000| [121016f8279fc3bce49f403e378418eaa167aae6] | committer: Zane van Iperen
avformat/argo_asf: add ASF_MIN_BUFFER_SIZE #define
For future use by the argo_brp demuxer
Signed-off-by: Zane van Iperen <zane at zanevaniperen.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=121016f8279fc3bce49f403e378418eaa167aae6
---
libavformat/argo_asf.c | 2 +-
libavformat/argo_asf.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/argo_asf.c b/libavformat/argo_asf.c
index ee8c85f735..c131207aa1 100644
--- a/libavformat/argo_asf.c
+++ b/libavformat/argo_asf.c
@@ -182,7 +182,7 @@ static int argo_asf_read_header(AVFormatContext *s)
AVIOContext *pb = s->pb;
AVStream *st;
ArgoASFDemuxContext *asf = s->priv_data;
- uint8_t buf[FFMAX(ASF_FILE_HEADER_SIZE, ASF_CHUNK_HEADER_SIZE)];
+ uint8_t buf[ASF_MIN_BUFFER_SIZE];
if (!(st = avformat_new_stream(s, NULL)))
return AVERROR(ENOMEM);
diff --git a/libavformat/argo_asf.h b/libavformat/argo_asf.h
index 905769dafe..8b1c6d5e2f 100644
--- a/libavformat/argo_asf.h
+++ b/libavformat/argo_asf.h
@@ -24,11 +24,13 @@
#define AVFORMAT_ARGO_ASF_H
#include <stdint.h>
+#include "libavutil/common.h"
#define ASF_TAG MKTAG('A', 'S', 'F', '\0')
#define ASF_FILE_HEADER_SIZE 24
#define ASF_CHUNK_HEADER_SIZE 20
#define ASF_SAMPLE_COUNT 32
+#define ASF_MIN_BUFFER_SIZE FFMAX(ASF_FILE_HEADER_SIZE, ASF_CHUNK_HEADER_SIZE)
typedef struct ArgoASFFileHeader {
uint32_t magic; /*< Magic Number, {'A', 'S', 'F', '\0'} */
More information about the ffmpeg-cvslog
mailing list