X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fapc.c;h=08ae9351dcf21c1a7b4c9f46e41966084c2a44b2;hb=f7ed044eeaf39c73333d3cc01d07b07d9bc860c6;hp=bb28a628f7e41c3d2ccf284f0a9c14e1660ccc27;hpb=31d9aa6b2e1a69379ebf1cf1b5449ff1bd98e0fa;p=ffmpeg diff --git a/libavformat/apc.c b/libavformat/apc.c index bb28a628f7e..08ae9351dcf 100644 --- a/libavformat/apc.c +++ b/libavformat/apc.c @@ -23,6 +23,7 @@ #include "libavutil/channel_layout.h" #include "avformat.h" +#include "internal.h" static int apc_probe(AVProbeData *p) { @@ -51,10 +52,7 @@ static int apc_read_header(AVFormatContext *s) avio_rl32(pb); /* number of samples */ st->codec->sample_rate = avio_rl32(pb); - st->codec->extradata_size = 2 * 4; - st->codec->extradata = av_malloc(st->codec->extradata_size + - FF_INPUT_BUFFER_PADDING_SIZE); - if (!st->codec->extradata) + if (ff_alloc_extradata(st->codec, 2 * 4)) return AVERROR(ENOMEM); /* initial predictor values for adpcm decoder */