summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/4xm.c2
-rw-r--r--libavformat/anm.c2
-rw-r--r--libavformat/apetag.c2
-rw-r--r--libavformat/apngdec.c4
-rw-r--r--libavformat/asfdec_f.c6
-rw-r--r--libavformat/asfdec_o.c4
-rw-r--r--libavformat/avc.c2
-rw-r--r--libavformat/avidec.c2
-rw-r--r--libavformat/avio.h2
-rw-r--r--libavformat/aviobuf.c4
-rw-r--r--libavformat/cafdec.c2
-rw-r--r--libavformat/dtsdec.c2
-rw-r--r--libavformat/flac_picture.c4
-rw-r--r--libavformat/flacdec.c2
-rw-r--r--libavformat/flvdec.c2
-rw-r--r--libavformat/hevc.c2
-rw-r--r--libavformat/hls.c2
-rw-r--r--libavformat/id3v2.c6
-rw-r--r--libavformat/iff.c4
-rw-r--r--libavformat/internal.h4
-rw-r--r--libavformat/jacosubdec.c2
-rw-r--r--libavformat/jvdec.c2
-rw-r--r--libavformat/matroskadec.c8
-rw-r--r--libavformat/mov.c10
-rw-r--r--libavformat/movenc.c2
-rw-r--r--libavformat/mpc8.c4
-rw-r--r--libavformat/mpegts.c16
-rw-r--r--libavformat/mxg.c2
-rw-r--r--libavformat/oggdec.c10
-rw-r--r--libavformat/oggparseogm.c2
-rw-r--r--libavformat/oggparsetheora.c4
-rw-r--r--libavformat/oggparsevorbis.c2
-rw-r--r--libavformat/rdt.c4
-rw-r--r--libavformat/redspark.c2
-rw-r--r--libavformat/rmdec.c4
-rw-r--r--libavformat/rtpdec_h264.c4
-rw-r--r--libavformat/rtpdec_hevc.c4
-rw-r--r--libavformat/rtpdec_latm.c2
-rw-r--r--libavformat/rtpdec_qt.c6
-rw-r--r--libavformat/rtpdec_xiph.c4
-rw-r--r--libavformat/spdifenc.c2
-rw-r--r--libavformat/takdec.c4
-rw-r--r--libavformat/utils.c6
43 files changed, 83 insertions, 83 deletions
diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index 8fdad185f4..260e080962 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -111,7 +111,7 @@ static int parse_vtrk(AVFormatContext *s,
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = AV_CODEC_ID_4XM;
- st->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);
+ st->codec->extradata = av_mallocz(4 + AV_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)
return AVERROR(ENOMEM);
st->codec->extradata_size = 4;
diff --git a/libavformat/anm.c b/libavformat/anm.c
index f718797310..23200474bd 100644
--- a/libavformat/anm.c
+++ b/libavformat/anm.c
@@ -133,7 +133,7 @@ static int read_header(AVFormatContext *s)
/* color cycling and palette data */
st->codec->extradata_size = 16*8 + 4*256;
- st->codec->extradata = av_mallocz(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
+ st->codec->extradata = av_mallocz(st->codec->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata) {
return AVERROR(ENOMEM);
}
diff --git a/libavformat/apetag.c b/libavformat/apetag.c
index 26359205f8..2ee277f864 100644
--- a/libavformat/apetag.c
+++ b/libavformat/apetag.c
@@ -55,7 +55,7 @@ static int ape_tag_read_field(AVFormatContext *s)
av_log(s, AV_LOG_WARNING, "Invalid APE tag key '%s'.\n", key);
return -1;
}
- if (size > INT32_MAX - FF_INPUT_BUFFER_PADDING_SIZE) {
+ if (size > INT32_MAX - AV_INPUT_BUFFER_PADDING_SIZE) {
av_log(s, AV_LOG_ERROR, "APE tag size too large.\n");
return AVERROR_INVALIDDATA;
}
diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c
index 6deff3b66b..84298aecfd 100644
--- a/libavformat/apngdec.c
+++ b/libavformat/apngdec.c
@@ -132,7 +132,7 @@ static int append_extradata(AVCodecContext *s, AVIOContext *pb, int len)
return AVERROR_INVALIDDATA;
new_size = previous_size + len;
- new_extradata = av_realloc(s->extradata, new_size + FF_INPUT_BUFFER_PADDING_SIZE);
+ new_extradata = av_realloc(s->extradata, new_size + AV_INPUT_BUFFER_PADDING_SIZE);
if (!new_extradata)
return AVERROR(ENOMEM);
s->extradata = new_extradata;
@@ -178,7 +178,7 @@ static int apng_read_header(AVFormatContext *s)
return ret;
/* extradata will contain every chunk up to the first fcTL (excluded) */
- st->codec->extradata = av_malloc(len + 12 + FF_INPUT_BUFFER_PADDING_SIZE);
+ st->codec->extradata = av_malloc(len + 12 + AV_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)
return AVERROR(ENOMEM);
st->codec->extradata_size = len + 12;
diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c
index 9c791649c8..a30b7d7212 100644
--- a/libavformat/asfdec_f.c
+++ b/libavformat/asfdec_f.c
@@ -517,7 +517,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
if (sizeX > 40) {
st->codec->extradata_size = ffio_limit(pb, sizeX - 40);
st->codec->extradata = av_mallocz(st->codec->extradata_size +
- FF_INPUT_BUFFER_PADDING_SIZE);
+ AV_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)
return AVERROR(ENOMEM);
avio_read(pb, st->codec->extradata, st->codec->extradata_size);
@@ -1394,12 +1394,12 @@ static int asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt)
} else {
/* packet descrambling */
AVBufferRef *buf = av_buffer_alloc(asf_st->pkt.size +
- FF_INPUT_BUFFER_PADDING_SIZE);
+ AV_INPUT_BUFFER_PADDING_SIZE);
if (buf) {
uint8_t *newdata = buf->data;
int offset = 0;
memset(newdata + asf_st->pkt.size, 0,
- FF_INPUT_BUFFER_PADDING_SIZE);
+ AV_INPUT_BUFFER_PADDING_SIZE);
while (offset < asf_st->pkt.size) {
int off = offset / asf_st->ds_chunk_size;
int row = off / asf_st->ds_span;
diff --git a/libavformat/asfdec_o.c b/libavformat/asfdec_o.c
index ad601c89be..91c6e8612f 100644
--- a/libavformat/asfdec_o.c
+++ b/libavformat/asfdec_o.c
@@ -674,12 +674,12 @@ static int parse_video_info(AVIOContext *pb, AVStream *st)
int ret;
st->codec->extradata_size = size - BMP_HEADER_SIZE;
if (!(st->codec->extradata = av_malloc(st->codec->extradata_size +
- FF_INPUT_BUFFER_PADDING_SIZE))) {
+ AV_INPUT_BUFFER_PADDING_SIZE))) {
st->codec->extradata_size = 0;
return AVERROR(ENOMEM);
}
memset(st->codec->extradata + st->codec->extradata_size , 0,
- FF_INPUT_BUFFER_PADDING_SIZE);
+ AV_INPUT_BUFFER_PADDING_SIZE);
if ((ret = avio_read(pb, st->codec->extradata,
st->codec->extradata_size)) < 0)
return ret;
diff --git a/libavformat/avc.c b/libavformat/avc.c
index 9d843e0ca4..f7b8f38a00 100644
--- a/libavformat/avc.c
+++ b/libavformat/avc.c
@@ -180,7 +180,7 @@ int ff_avc_write_annexb_extradata(const uint8_t *in, uint8_t **buf, int *size)
if (11 + sps_size + pps_size > *size)
return AVERROR_INVALIDDATA;
out_size = 8 + sps_size + pps_size;
- out = av_mallocz(out_size + FF_INPUT_BUFFER_PADDING_SIZE);
+ out = av_mallocz(out_size + AV_INPUT_BUFFER_PADDING_SIZE);
if (!out)
return AVERROR(ENOMEM);
AV_WB32(&out[0], 0x00000001);
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 2f637225e9..42b75c0aee 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -823,7 +823,7 @@ static int avi_read_header(AVFormatContext *s)
st->codec->extradata_size += 9;
if ((ret = av_reallocp(&st->codec->extradata,
st->codec->extradata_size +
- FF_INPUT_BUFFER_PADDING_SIZE)) < 0) {
+ AV_INPUT_BUFFER_PADDING_SIZE)) < 0) {
st->codec->extradata_size = 0;
return ret;
} else
diff --git a/libavformat/avio.h b/libavformat/avio.h
index d3d9bbd15e..9b8fcce3eb 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -585,7 +585,7 @@ int avio_open_dyn_buf(AVIOContext **s);
/**
* Return the written size and a pointer to the buffer. The buffer
* must be freed with av_free().
- * Padding of FF_INPUT_BUFFER_PADDING_SIZE is added to the buffer.
+ * Padding of AV_INPUT_BUFFER_PADDING_SIZE is added to the buffer.
*
* @param s IO context
* @param pbuffer pointer to a byte buffer
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index ff850813e6..aceb3bfcb7 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -1130,7 +1130,7 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
{
DynBuffer *d;
int size;
- static const char padbuf[FF_INPUT_BUFFER_PADDING_SIZE] = {0};
+ static const char padbuf[AV_INPUT_BUFFER_PADDING_SIZE] = {0};
int padding = 0;
if (!s) {
@@ -1141,7 +1141,7 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
/* don't attempt to pad fixed-size packet buffers */
if (!s->max_packet_size) {
avio_write(s, padbuf, sizeof(padbuf));
- padding = FF_INPUT_BUFFER_PADDING_SIZE;
+ padding = AV_INPUT_BUFFER_PADDING_SIZE;
}
avio_flush(s);
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index cc6ed0ce9f..bfbbb02627 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -101,7 +101,7 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t size)
AVIOContext *pb = s->pb;
AVStream *st = s->streams[0];
- if (size < 0 || size > INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE)
+ if (size < 0 || size > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE)
return -1;
if (st->codec->codec_id == AV_CODEC_ID_AAC) {
diff --git a/libavformat/dtsdec.c b/libavformat/dtsdec.c
index da0fb61a60..ef283916e7 100644
--- a/libavformat/dtsdec.c
+++ b/libavformat/dtsdec.c
@@ -34,7 +34,7 @@ static int dts_probe(AVProbeData *p)
int markers[4*16] = {0};
int sum, max, i;
int64_t diff = 0;
- uint8_t hdr[12 + FF_INPUT_BUFFER_PADDING_SIZE] = { 0 };
+ uint8_t hdr[12 + AV_INPUT_BUFFER_PADDING_SIZE] = { 0 };
buf = p->buf + FFMIN(4096, p->buf_size);
diff --git a/libavformat/flac_picture.c b/libavformat/flac_picture.c
index 669fd2e782..7bd98258e4 100644
--- a/libavformat/flac_picture.c
+++ b/libavformat/flac_picture.c
@@ -108,10 +108,10 @@ int ff_flac_parse_picture(AVFormatContext *s, uint8_t *buf, int buf_size)
ret = AVERROR_INVALIDDATA;
goto fail;
}
- if (!(data = av_buffer_alloc(len + FF_INPUT_BUFFER_PADDING_SIZE))) {
+ if (!(data = av_buffer_alloc(len + AV_INPUT_BUFFER_PADDING_SIZE))) {
RETURN_ERROR(AVERROR(ENOMEM));
}
- memset(data->data + len, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+ memset(data->data + len, 0, AV_INPUT_BUFFER_PADDING_SIZE);
if (avio_read(pb, data->data, len) != len) {
av_log(s, AV_LOG_ERROR, "Error reading attached picture data.\n");
if (s->error_recognition & AV_EF_EXPLODE)
diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c
index 4207fd2bf6..4c1f943581 100644
--- a/libavformat/flacdec.c
+++ b/libavformat/flacdec.c
@@ -58,7 +58,7 @@ static int flac_read_header(AVFormatContext *s)
case FLAC_METADATA_TYPE_CUESHEET:
case FLAC_METADATA_TYPE_PICTURE:
case FLAC_METADATA_TYPE_VORBIS_COMMENT:
- buffer = av_mallocz(metadata_size + FF_INPUT_BUFFER_PADDING_SIZE);
+ buffer = av_mallocz(metadata_size + AV_INPUT_BUFFER_PADDING_SIZE);
if (!buffer) {
return AVERROR(ENOMEM);
}
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 345be1ea7d..36a179722f 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -654,7 +654,7 @@ static int flv_queue_extradata(FLVContext *flv, AVIOContext *pb, int stream,
{
av_free(flv->new_extradata[stream]);
flv->new_extradata[stream] = av_mallocz(size +
- FF_INPUT_BUFFER_PADDING_SIZE);
+ AV_INPUT_BUFFER_PADDING_SIZE);
if (!flv->new_extradata[stream])
return AVERROR(ENOMEM);
flv->new_extradata_size[stream] = size;
diff --git a/libavformat/hevc.c b/libavformat/hevc.c
index a9542ffd3d..47f18819a8 100644
--- a/libavformat/hevc.c
+++ b/libavformat/hevc.c
@@ -644,7 +644,7 @@ static uint8_t *nal_unit_extract_rbsp(const uint8_t *src, uint32_t src_len,
uint8_t *dst;
uint32_t i, len;
- dst = av_malloc(src_len + FF_INPUT_BUFFER_PADDING_SIZE);
+ dst = av_malloc(src_len + AV_INPUT_BUFFER_PADDING_SIZE);
if (!dst)
return NULL;
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 6d14d6bf98..05e08a953d 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -752,7 +752,7 @@ static int id3_has_changed_values(struct playlist *pls, AVDictionary *metadata,
if (apic) {
int size = pls->ctx->streams[1]->attached_pic.size;
- if (size != apic->buf->size - FF_INPUT_BUFFER_PADDING_SIZE)
+ if (size != apic->buf->size - AV_INPUT_BUFFER_PADDING_SIZE)
return 1;
if (memcmp(apic->buf->data, pls->ctx->streams[1]->attached_pic.data, size) != 0)
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 6eec60e896..addf937afd 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -605,10 +605,10 @@ static void read_apic(AVFormatContext *s, AVIOContext *pb, int taglen,
goto fail;
}
- apic->buf = av_buffer_alloc(taglen + FF_INPUT_BUFFER_PADDING_SIZE);
+ apic->buf = av_buffer_alloc(taglen + AV_INPUT_BUFFER_PADDING_SIZE);
if (!apic->buf || !taglen || avio_read(pb, apic->buf->data, taglen) != taglen)
goto fail;
- memset(apic->buf->data + taglen, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+ memset(apic->buf->data + taglen, 0, AV_INPUT_BUFFER_PADDING_SIZE);
new_extra->tag = "APIC";
new_extra->data = apic;
@@ -1105,7 +1105,7 @@ int ff_id3v2_parse_apic(AVFormatContext *s, ID3v2ExtraMeta **extra_meta)
av_init_packet(&st->attached_pic);
st->attached_pic.buf = apic->buf;
st->attached_pic.data = apic->buf->data;
- st->attached_pic.size = apic->buf->size - FF_INPUT_BUFFER_PADDING_SIZE;
+ st->attached_pic.size = apic->buf->size - AV_INPUT_BUFFER_PADDING_SIZE;
st->attached_pic.stream_index = st->index;
st->attached_pic.flags |= AV_PKT_FLAG_KEY;
diff --git a/libavformat/iff.c b/libavformat/iff.c
index 7235bc1c9c..8ea3b38ac6 100644
--- a/libavformat/iff.c
+++ b/libavformat/iff.c
@@ -455,7 +455,7 @@ static int iff_read_header(AVFormatContext *s)
return AVERROR_INVALIDDATA;
}
st->codec->extradata_size = data_size + IFF_EXTRA_VIDEO_SIZE;
- st->codec->extradata = av_malloc(data_size + IFF_EXTRA_VIDEO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
+ st->codec->extradata = av_malloc(data_size + IFF_EXTRA_VIDEO_SIZE + AV_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)
return AVERROR(ENOMEM);
if (avio_read(pb, st->codec->extradata + IFF_EXTRA_VIDEO_SIZE, data_size) < 0)
@@ -682,7 +682,7 @@ static int iff_read_header(AVFormatContext *s)
if (!st->codec->extradata) {
st->codec->extradata_size = IFF_EXTRA_VIDEO_SIZE;
- st->codec->extradata = av_malloc(IFF_EXTRA_VIDEO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
+ st->codec->extradata = av_malloc(IFF_EXTRA_VIDEO_SIZE + AV_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)
return AVERROR(ENOMEM);
}
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 1190dbdf60..77914d802c 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -449,7 +449,7 @@ uint8_t *ff_stream_new_side_data(AVStream *st, enum AVPacketSideDataType type,
int size);
/**
- * Allocate extradata with additional FF_INPUT_BUFFER_PADDING_SIZE at end
+ * Allocate extradata with additional AV_INPUT_BUFFER_PADDING_SIZE at end
* which is always set to 0.
*
* @param size size of extradata
@@ -458,7 +458,7 @@ uint8_t *ff_stream_new_side_data(AVStream *st, enum AVPacketSideDataType type,
int ff_alloc_extradata(AVCodecContext *avctx, int size);
/**
- * Allocate extradata with additional FF_INPUT_BUFFER_PADDING_SIZE at end
+ * Allocate extradata with additional AV_INPUT_BUFFER_PADDING_SIZE at end
* which is always set to 0 and fill it from pb.
*
* @param size size of extradata
diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c
index 1ca0055877..63895d7efe 100644
--- a/libavformat/jacosubdec.c
+++ b/libavformat/jacosubdec.c
@@ -172,7 +172,7 @@ static int jacosub_read_header(AVFormatContext *s)
jacosub->timeres = 30;
- av_bprint_init(&header, 1024+FF_INPUT_BUFFER_PADDING_SIZE, 4096);
+ av_bprint_init(&header, 1024+AV_INPUT_BUFFER_PADDING_SIZE, 4096);
while (!avio_feof(pb)) {
int cmd_len;
diff --git a/libavformat/jvdec.c b/libavformat/jvdec.c
index 64d31e0ee6..4d4f0c78c5 100644
--- a/libavformat/jvdec.c
+++ b/libavformat/jvdec.c
@@ -196,7 +196,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
return ret;
if (ret < size) {
memset(pkt->data + JV_PREAMBLE_SIZE + ret, 0,
- FF_INPUT_BUFFER_PADDING_SIZE);
+ AV_INPUT_BUFFER_PADDING_SIZE);
pkt->flags |= AV_PKT_FLAG_CORRUPT;
}
pkt->size = ret + JV_PREAMBLE_SIZE;
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index b546798118..1807caef9c 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1853,7 +1853,7 @@ static int matroska_parse_tracks(AVFormatContext *s)
} else if (codec_id == AV_CODEC_ID_AAC && !track->codec_priv.size) {
int profile = matroska_aac_profile(track->codec_id);
int sri = matroska_aac_sri(track->audio.samplerate);
- extradata = av_mallocz(5 + FF_INPUT_BUFFER_PADDING_SIZE);
+ extradata = av_mallocz(5 + AV_INPUT_BUFFER_PADDING_SIZE);
if (!extradata)
return AVERROR(ENOMEM);
extradata[0] = (profile << 3) | ((sri & 0x0E) >> 1);
@@ -1866,13 +1866,13 @@ static int matroska_parse_tracks(AVFormatContext *s)
extradata_size = 5;
} else
extradata_size = 2;
- } else if (codec_id == AV_CODEC_ID_ALAC && track->codec_priv.size && track->codec_priv.size < INT_MAX - 12 - FF_INPUT_BUFFER_PADDING_SIZE) {
+ } else if (codec_id == AV_CODEC_ID_ALAC && track->codec_priv.size && track->codec_priv.size < INT_MAX - 12 - AV_INPUT_BUFFER_PADDING_SIZE) {
/* Only ALAC's magic cookie is stored in Matroska's track headers.
* Create the "atom size", "tag", and "tag version" fields the
* decoder expects manually. */
extradata_size = 12 + track->codec_priv.size;
extradata = av_mallocz(extradata_size +
- FF_INPUT_BUFFER_PADDING_SIZE);
+ AV_INPUT_BUFFER_PADDING_SIZE);
if (!extradata)
return AVERROR(ENOMEM);
AV_WB32(extradata, extradata_size);
@@ -1882,7 +1882,7 @@ static int matroska_parse_tracks(AVFormatContext *s)
track->codec_priv.size);
} else if (codec_id == AV_CODEC_ID_TTA) {
extradata_size = 30;
- extradata = av_mallocz(extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
+ extradata = av_mallocz(extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
if (!extradata)
return AVERROR(ENOMEM);
ffio_init_context(&b, extradata, extradata_size, 1,
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 1624d4e10c..fdba34cf4a 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1246,14 +1246,14 @@ static int mov_read_fiel(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_realloc_extradata(AVCodecContext *codec, MOVAtom atom)
{
int err = 0;
- uint64_t size = (uint64_t)codec->extradata_size + atom.size + 8 + FF_INPUT_BUFFER_PADDING_SIZE;
+ uint64_t size = (uint64_t)codec->extradata_size + atom.size + 8 + AV_INPUT_BUFFER_PADDING_SIZE;
if (size > INT_MAX || (uint64_t)atom.size > INT_MAX)
return AVERROR_INVALIDDATA;
if ((err = av_reallocp(&codec->extradata, size)) < 0) {
codec->extradata_size = 0;
return err;
}
- codec->extradata_size = size - FF_INPUT_BUFFER_PADDING_SIZE;
+ codec->extradata_size = size - AV_INPUT_BUFFER_PADDING_SIZE;
return 0;
}
@@ -1275,7 +1275,7 @@ static int64_t mov_read_atom_into_extradata(MOVContext *c, AVIOContext *pb, MOVA
codec->extradata_size -= atom.size - err;
result = err;
}
- memset(buf + 8 + err, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+ memset(buf + 8 + err, 0, AV_INPUT_BUFFER_PADDING_SIZE);
return result;
}
@@ -1899,7 +1899,7 @@ static int mov_rewrite_dvd_sub_extradata(AVStream *st)
av_freep(&st->codec->extradata);
st->codec->extradata_size = 0;
- st->codec->extradata = av_mallocz(strlen(buf) + FF_INPUT_BUFFER_PADDING_SIZE);
+ st->codec->extradata = av_mallocz(strlen(buf) + AV_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)
return AVERROR(ENOMEM);
st->codec->extradata_size = strlen(buf);
@@ -2336,7 +2336,7 @@ static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom)
num_bytes = (entries*field_size+4)>>3;
- buf = av_malloc(num_bytes+FF_INPUT_BUFFER_PADDING_SIZE);
+ buf = av_malloc(num_bytes+AV_INPUT_BUFFER_PADDING_SIZE);
if (!buf) {
av_freep(&sc->sample_sizes);
return AVERROR(ENOMEM);
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 8b7e582768..e03c4ec082 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -733,7 +733,7 @@ static int mov_write_dvc1_structs(MOVTrack *track, uint8_t *buf)
"dvc1 atom. Set the delay_moov flag to fix this.\n");
}
- unescaped = av_mallocz(track->vos_len + FF_INPUT_BUFFER_PADDING_SIZE);
+ unescaped = av_mallocz(track->vos_len + AV_INPUT_BUFFER_PADDING_SIZE);
if (!unescaped)
return AVERROR(ENOMEM);
start = find_next_marker(track->vos_data, end);
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index 0cef65ff7d..bf597b88a5 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -154,7 +154,7 @@ static void mpc8_parse_seektable(AVFormatContext *s, int64_t off)
av_log(s, AV_LOG_ERROR, "Bad seek table size\n");
return;
}
- if(!(buf = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE)))
+ if(!(buf = av_malloc(size + AV_INPUT_BUFFER_PADDING_SIZE)))
return;
ret = avio_read(s->pb, buf, size);
if (ret != size) {
@@ -162,7 +162,7 @@ static void mpc8_parse_seektable(AVFormatContext *s, int64_t off)
av_free(buf);
return;
}
- memset(buf+size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+ memset(buf+size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
init_get_bits(&gb, buf, size * 8);
size = gb_get_v(&gb);
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 6f4a47d577..3c1fcdd6fb 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -871,7 +871,7 @@ static void new_pes_packet(PESContext *pes, AVPacket *pkt)
av_log(pes->stream, AV_LOG_WARNING, "PES packet size mismatch\n");
pes->flags |= AV_PKT_FLAG_CORRUPT;
}
- memset(pkt->data + pkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+ memset(pkt->data + pkt->size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
// Separate out the AC3 substream from an HDMV combined TrueHD/AC3 PID
if (pes->sub_st && pes->stream_type == 0x83 && pes->extended_stream_id == 0x76)
@@ -903,8 +903,8 @@ static int read_sl_header(PESContext *pes, SLConfigDescr *sl,
int padding_flag = 0, padding_bits = 0, inst_bitrate_flag = 0;
int dts_flag = -1, cts_flag = -1;
int64_t dts = AV_NOPTS_VALUE, cts = AV_NOPTS_VALUE;
- uint8_t buf_padded[128 + FF_INPUT_BUFFER_PADDING_SIZE];
- int buf_padded_size = FFMIN(buf_size, sizeof(buf_padded) - FF_INPUT_BUFFER_PADDING_SIZE);
+ uint8_t buf_padded[128 + AV_INPUT_BUFFER_PADDING_SIZE];
+ int buf_padded_size = FFMIN(buf_size, sizeof(buf_padded) - AV_INPUT_BUFFER_PADDING_SIZE);
memcpy(buf_padded, buf, buf_padded_size);
@@ -1036,7 +1036,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
/* allocate pes buffer */
pes->buffer = av_buffer_alloc(pes->total_size +
- FF_INPUT_BUFFER_PADDING_SIZE);
+ AV_INPUT_BUFFER_PADDING_SIZE);
if (!pes->buffer)
return AVERROR(ENOMEM);
@@ -1194,7 +1194,7 @@ skip:
new_pes_packet(pes, ts->pkt);
pes->total_size = MAX_PES_PAYLOAD;
pes->buffer = av_buffer_alloc(pes->total_size +
- FF_INPUT_BUFFER_PADDING_SIZE);
+ AV_INPUT_BUFFER_PADDING_SIZE);
if (!pes->buffer)
return AVERROR(ENOMEM);
ts->stop_parse = 1;
@@ -1793,7 +1793,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
ext_desc_tag == 0x80) { /* User defined (provisional Opus) */
if (!st->codec->extradata) {
st->codec->extradata = av_mallocz(sizeof(opus_default_extradata) +
- FF_INPUT_BUFFER_PADDING_SIZE);
+ AV_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)
return AVERROR(ENOMEM);
@@ -2382,7 +2382,7 @@ static void finished_reading_packet(AVFormatContext *s, int raw_packet_size)
static int handle_packets(MpegTSContext *ts, int64_t nb_packets)
{
AVFormatContext *s = ts->stream;
- uint8_t packet[TS_PACKET_SIZE + FF_INPUT_BUFFER_PADDING_SIZE];
+ uint8_t packet[TS_PACKET_SIZE + AV_INPUT_BUFFER_PADDING_SIZE];
const uint8_t *data;
int64_t packet_num;
int ret = 0;
@@ -2409,7 +2409,7 @@ static int handle_packets(MpegTSContext *ts, int64_t nb_packets)
ts->stop_parse = 0;
packet_num = 0;
- memset(packet + TS_PACKET_SIZE, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+ memset(packet + TS_PACKET_SIZE, 0, AV_INPUT_BUFFER_PADDING_SIZE);
for (;;) {
packet_num++;
if (nb_packets != 0 && packet_num >= nb_packets ||
diff --git a/libavformat/mxg.c b/libavformat/mxg.c
index 34977b8197..3a34ebd5b5 100644
--- a/libavformat/mxg.c
+++ b/libavformat/mxg.c
@@ -111,7 +111,7 @@ static int mxg_update_cache(AVFormatContext *s, unsigned int cache_size)
soi_pos = mxg->soi_ptr - mxg->buffer;
buffer = av_fast_realloc(mxg->buffer, &mxg->buffer_size,
current_pos + cache_size +
- FF_INPUT_BUFFER_PADDING_SIZE);
+ AV_INPUT_BUFFER_PADDING_SIZE);
if (!buffer)
return AVERROR(ENOMEM);
mxg->buffer = buffer;
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 0a9f33717b..6edef13ff7 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -82,7 +82,7 @@ static int ogg_save(AVFormatContext *s)
for (i = 0; i < ogg->nstreams; i++) {
struct ogg_stream *os = ogg->streams + i;
- os->buf = av_mallocz(os->bufsize + FF_INPUT_BUFFER_PADDING_SIZE);
+ os->buf = av_mallocz(os->bufsize + AV_INPUT_BUFFER_PADDING_SIZE);
if (os->buf)
memcpy(os->buf, ost->streams[i].buf, os->bufpos);
else
@@ -263,7 +263,7 @@ static int ogg_new_stream(AVFormatContext *s, uint32_t serial)
memset(os, 0, sizeof(*os));
os->serial = serial;
os->bufsize = DECODER_BUFFER_SIZE;
- os->buf = av_malloc(os->bufsize + FF_INPUT_BUFFER_PADDING_SIZE);
+ os->buf = av_malloc(os->bufsize + AV_INPUT_BUFFER_PADDING_SIZE);
os->header = -1;
os->start_granule = OGG_NOGRANULE_VALUE;
if (!os->buf)
@@ -285,7 +285,7 @@ static int ogg_new_stream(AVFormatContext *s, uint32_t serial)
static int ogg_new_buf(struct ogg *ogg, int idx)
{
struct ogg_stream *os = ogg->streams + idx;
- uint8_t *nb = av_malloc(os->bufsize + FF_INPUT_BUFFER_PADDING_SIZE);
+ uint8_t *nb = av_malloc(os->bufsize + AV_INPUT_BUFFER_PADDING_SIZE);
int size = os->bufpos - os->pstart;
if (!nb)
@@ -424,7 +424,7 @@ static int ogg_read_page(AVFormatContext *s, int *sid)
}
if (os->bufsize - os->bufpos < size) {
- uint8_t *nb = av_malloc((os->bufsize *= 2) + FF_INPUT_BUFFER_PADDING_SIZE);
+ uint8_t *nb = av_malloc((os->bufsize *= 2) + AV_INPUT_BUFFER_PADDING_SIZE);
if (!nb)
return AVERROR(ENOMEM);
memcpy(nb, os->buf, os->bufpos);
@@ -440,7 +440,7 @@ static int ogg_read_page(AVFormatContext *s, int *sid)
os->granule = gp;
os->flags = flags;
- memset(os->buf + os->bufpos, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+ memset(os->buf + os->bufpos, 0, AV_INPUT_BUFFER_PADDING_SIZE);
if (sid)
*sid = idx;
diff --git a/libavformat/oggparseogm.c b/libavformat/oggparseogm.c
index 54024e0a0a..ae8c3c850c 100644
--- a/libavformat/oggparseogm.c
+++ b/libavformat/oggparseogm.c
@@ -102,7 +102,7 @@ ogm_header(AVFormatContext *s, int idx)
size -= 4;
}
if (size > 52) {
- av_assert0(FF_INPUT_BUFFER_PADDING_SIZE <= 52);
+ av_assert0(AV_INPUT_BUFFER_PADDING_SIZE <= 52);
size -= 52;
ff_alloc_extradata(st->codec, size);
bytestream2_get_buffer(&p, st->codec->extradata, st->codec->extradata_size);
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index 91c70dfec9..e92d4c5170 100644
--- a/libavformat/oggparsetheora.c
+++ b/libavformat/oggparsetheora.c
@@ -127,11 +127,11 @@ static int theora_header(AVFormatContext *s, int idx)
}
if ((err = av_reallocp(&st->codec->extradata,
- cds + FF_INPUT_BUFFER_PADDING_SIZE)) < 0) {
+ cds + AV_INPUT_BUFFER_PADDING_SIZE)) < 0) {
st->codec->extradata_size = 0;
return err;
}
- memset(st->codec->extradata + cds, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+ memset(st->codec->extradata + cds, 0, AV_INPUT_BUFFER_PADDING_SIZE);
cdp = st->codec->extradata + st->codec->extradata_size;
*cdp++ = os->psize >> 8;
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index dd44337437..59e7b75522 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -242,7 +242,7 @@ static int fixup_vorbis_headers(AVFormatContext *as,
offset += priv->len[i];
av_freep(&priv->packet[i]);
}
- if ((err = av_reallocp(buf, offset + FF_INPUT_BUFFER_PADDING_SIZE)) < 0)
+ if ((err = av_reallocp(buf, offset + AV_INPUT_BUFFER_PADDING_SIZE)) < 0)
return err;
return offset;
}
diff --git a/libavformat/rdt.c b/libavformat/rdt.c
index bb56a8ba81..046d2732a4 100644
--- a/libavformat/rdt.c
+++ b/libavformat/rdt.c
@@ -86,7 +86,7 @@ struct PayloadContext {
RMStream **rmst;
uint8_t *mlti_data;
unsigned int mlti_data_size;
- char buffer[RTP_MAX_PACKET_LENGTH + FF_INPUT_BUFFER_PADDING_SIZE];
+ char buffer[RTP_MAX_PACKET_LENGTH + AV_INPUT_BUFFER_PADDING_SIZE];
int audio_pkt_cnt; /**< remaining audio packets in rmdec */
};
@@ -398,7 +398,7 @@ rdt_parse_b64buf (unsigned int *target_len, const char *p)
len -= 2; /* skip embracing " at start/end */
}
*target_len = len * 3 / 4;
- target = av_mallocz(*target_len + FF_INPUT_BUFFER_PADDING_SIZE);
+ target = av_mallocz(*target_len + AV_INPUT_BUFFER_PADDING_SIZE);
if (!target)
return NULL;
av_base64_decode(target, p, *target_len);
diff --git a/libavformat/redspark.c b/libavformat/redspark.c
index 13a7b37d25..66c2dc5aae 100644
--- a/libavformat/redspark.c
+++ b/libavformat/redspark.c
@@ -67,7 +67,7 @@ static int redspark_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
codec = st->codec;
- header = av_malloc(HEADER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
+ header = av_malloc(HEADER_SIZE + AV_INPUT_BUFFER_PADDING_SIZE);
if (!header)
return AVERROR(ENOMEM);
pbc = header;
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 832f15daa4..6b66b953eb 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -220,7 +220,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
if (version == 5)
avio_r8(pb);
codecdata_length = avio_rb32(pb);
- if(codecdata_length + FF_INPUT_BUFFER_PADDING_SIZE <= (unsigned)codecdata_length){
+ if(codecdata_length + AV_INPUT_BUFFER_PADDING_SIZE <= (unsigned)codecdata_length){
av_log(s, AV_LOG_ERROR, "codecdata_length too large\n");
return -1;
}
@@ -250,7 +250,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
if (version == 5)
avio_r8(pb);
codecdata_length = avio_rb32(pb);
- if(codecdata_length + FF_INPUT_BUFFER_PADDING_SIZE <= (unsigned)codecdata_length){
+ if(codecdata_length + AV_INPUT_BUFFER_PADDING_SIZE <= (unsigned)codecdata_length){
av_log(s, AV_LOG_ERROR, "codecdata_length too large\n");
return -1;
}
diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c
index 2ac79dbf5e..b399be423e 100644
--- a/libavformat/rtpdec_h264.c
+++ b/libavformat/rtpdec_h264.c
@@ -119,7 +119,7 @@ int ff_h264_parse_sprop_parameter_sets(AVFormatContext *s,
uint8_t *dest = av_realloc(*data_ptr,
packet_size + sizeof(start_sequence) +
*size_ptr +
- FF_INPUT_BUFFER_PADDING_SIZE);
+ AV_INPUT_BUFFER_PADDING_SIZE);
if (!dest) {
av_log(s, AV_LOG_ERROR,
"Unable to allocate memory for extradata!\n");
@@ -132,7 +132,7 @@ int ff_h264_parse_sprop_parameter_sets(AVFormatContext *s,
memcpy(dest + *size_ptr + sizeof(start_sequence),
decoded_packet, packet_size);
memset(dest + *size_ptr + sizeof(start_sequence) +
- packet_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+ packet_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
*size_ptr += sizeof(start_sequence) + packet_size;
}
diff --git a/libavformat/rtpdec_hevc.c b/libavformat/rtpdec_hevc.c
index 51c2094882..815a72c2b2 100644
--- a/libavformat/rtpdec_hevc.c
+++ b/libavformat/rtpdec_hevc.c
@@ -152,7 +152,7 @@ static av_cold int hevc_parse_sdp_line(AVFormatContext *ctx, int st_index,
codec->extradata_size = hevc_data->vps_size + hevc_data->sps_size +
hevc_data->pps_size + hevc_data->sei_size;
codec->extradata = av_malloc(codec->extradata_size +
- FF_INPUT_BUFFER_PADDING_SIZE);
+ AV_INPUT_BUFFER_PADDING_SIZE);
if (!codec->extradata) {
ret = AVERROR(ENOMEM);
codec->extradata_size = 0;
@@ -166,7 +166,7 @@ static av_cold int hevc_parse_sdp_line(AVFormatContext *ctx, int st_index,
pos += hevc_data->pps_size;
memcpy(codec->extradata + pos, hevc_data->sei, hevc_data->sei_size);
pos += hevc_data->sei_size;
- memset(codec->extradata + pos, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+ memset(codec->extradata + pos, 0, AV_INPUT_BUFFER_PADDING_SIZE);
}
av_freep(&hevc_data->vps);
diff --git a/libavformat/rtpdec_latm.c b/libavformat/rtpdec_latm.c
index 7db92f60fa..aebba5741d 100644
--- a/libavformat/rtpdec_latm.c
+++ b/libavformat/rtpdec_latm.c
@@ -97,7 +97,7 @@ static int parse_fmtp_config(AVStream *st, const char *value)
int audio_mux_version, same_time_framing, num_programs, num_layers;
/* Pad this buffer, too, to avoid out of bounds reads with get_bits below */
- config = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);
+ config = av_mallocz(len + AV_INPUT_BUFFER_PADDING_SIZE);
if (!config)
return AVERROR(ENOMEM);
ff_hex_to_data(config, value);
diff --git a/libavformat/rtpdec_qt.c b/libavformat/rtpdec_qt.c
index ba701dc6cf..e11303fe01 100644
--- a/libavformat/rtpdec_qt.c
+++ b/libavformat/rtpdec_qt.c
@@ -174,14 +174,14 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
if (qt->pkt.size > 0 && qt->timestamp == *timestamp) {
int err;
if ((err = av_reallocp(&qt->pkt.data, qt->pkt.size + alen +
- FF_INPUT_BUFFER_PADDING_SIZE)) < 0) {
+ AV_INPUT_BUFFER_PADDING_SIZE)) < 0) {
qt->pkt.size = 0;
return err;
}
} else {
av_freep(&qt->pkt.data);
av_init_packet(&qt->pkt);
- qt->pkt.data = av_realloc(NULL, alen + FF_INPUT_BUFFER_PADDING_SIZE);
+ qt->pkt.data = av_realloc(NULL, alen + AV_INPUT_BUFFER_PADDING_SIZE);
if (!qt->pkt.data)
return AVERROR(ENOMEM);
qt->pkt.size = 0;
@@ -198,7 +198,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
qt->pkt.data = NULL;
pkt->flags = keyframe ? AV_PKT_FLAG_KEY : 0;
pkt->stream_index = st->index;
- memset(pkt->data + pkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+ memset(pkt->data + pkt->size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
return 0;
}
return AVERROR(EAGAIN);
diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c
index eceb840580..9ea3b19386 100644
--- a/libavformat/rtpdec_xiph.c
+++ b/libavformat/rtpdec_xiph.c
@@ -262,8 +262,8 @@ parse_packed_headers(const uint8_t * packed_headers,
/* allocate extra space:
* -- length/255 +2 for xiphlacing
* -- one for the '2' marker
- * -- FF_INPUT_BUFFER_PADDING_SIZE required */
- extradata_alloc = length + length/255 + 3 + FF_INPUT_BUFFER_PADDING_SIZE;
+ * -- AV_INPUT_BUFFER_PADDING_SIZE required */
+ extradata_alloc = length + length/255 + 3 + AV_INPUT_BUFFER_PADDING_SIZE;
if (ff_alloc_extradata(codec, extradata_alloc)) {
av_log(codec, AV_LOG_ERROR, "Out of memory\n");
diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c
index cdcff24421..b4608a1c7c 100644
--- a/libavformat/spdifenc.c
+++ b/libavformat/spdifenc.c
@@ -525,7 +525,7 @@ static int spdif_write_packet(struct AVFormatContext *s, AVPacket *pkt)
if (ctx->extra_bswap ^ (ctx->spdif_flags & SPDIF_FLAG_BIGENDIAN)) {
avio_write(s->pb, ctx->out_buf, ctx->out_bytes & ~1);
} else {
- av_fast_malloc(&ctx->buffer, &ctx->buffer_size, ctx->out_bytes + FF_INPUT_BUFFER_PADDING_SIZE);
+ av_fast_malloc(&ctx->buffer, &ctx->buffer_size, ctx->out_bytes + AV_INPUT_BUFFER_PADDING_SIZE);
if (!ctx->buffer)
return AVERROR(ENOMEM);
ff_spdif_bswap_buf16((uint16_t *)ctx->buffer, (uint16_t *)ctx->out_buf, ctx->out_bytes >> 1);
diff --git a/libavformat/takdec.c b/libavformat/takdec.c
index 3eb1a8ec2d..970ab4a8b4 100644
--- a/libavformat/takdec.c
+++ b/libavformat/takdec.c
@@ -82,10 +82,10 @@ static int tak_read_header(AVFormatContext *s)
if (size <= 3)
return AVERROR_INVALIDDATA;
- buffer = av_malloc(size - 3 + FF_INPUT_BUFFER_PADDING_SIZE);
+ buffer = av_malloc(size - 3 + AV_INPUT_BUFFER_PADDING_SIZE);
if (!buffer)
return AVERROR(ENOMEM);
- memset(buffer + size - 3, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+ memset(buffer + size - 3, 0, AV_INPUT_BUFFER_PADDING_SIZE);
ffio_init_checksum(pb, tak_check_crc, 0xCE04B7U);
if (avio_read(pb, buffer, size - 3) != size - 3) {
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 831d90a356..ccc2129126 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2922,14 +2922,14 @@ int ff_alloc_extradata(AVCodecContext *avctx, int size)
{
int ret;
- if (size < 0 || size >= INT32_MAX - FF_INPUT_BUFFER_PADDING_SIZE) {
+ if (size < 0 || size >= INT32_MAX - AV_INPUT_BUFFER_PADDING_SIZE) {
avctx->extradata = NULL;
avctx->extradata_size = 0;
return AVERROR(EINVAL);
}
- avctx->extradata = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
+ avctx->extradata = av_malloc(size + AV_INPUT_BUFFER_PADDING_SIZE);
if (avctx->extradata) {
- memset(avctx->extradata + size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+ memset(avctx->extradata + size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
avctx->extradata_size = size;
ret = 0;
} else {