Browse Source

avformat/argo_asf: add ASF_MIN_BUFFER_SIZE #define

For future use by the argo_brp demuxer

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
tags/n4.4
Zane van Iperen 5 years ago
parent
commit
121016f827
No known key found for this signature in database GPG Key ID: 68616B2D8AC4DCC5
2 changed files with 3 additions and 1 deletions
  1. +1
    -1
      libavformat/argo_asf.c
  2. +2
    -0
      libavformat/argo_asf.h

+ 1
- 1
libavformat/argo_asf.c View File

@@ -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);


+ 2
- 0
libavformat/argo_asf.h View File

@@ -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'} */


Loading…
Cancel
Save