summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_latm.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/rtpdec_latm.c')
-rw-r--r--libavformat/rtpdec_latm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/rtpdec_latm.c b/libavformat/rtpdec_latm.c
index a2ad07104a..fdeff3a151 100644
--- a/libavformat/rtpdec_latm.c
+++ b/libavformat/rtpdec_latm.c
@@ -130,10 +130,7 @@ static int parse_fmtp_config(AVStream *st, char *value)
goto end;
}
av_freep(&st->codec->extradata);
- st->codec->extradata_size = (get_bits_left(&gb) + 7)/8;
- st->codec->extradata = av_mallocz(st->codec->extradata_size +
- FF_INPUT_BUFFER_PADDING_SIZE);
- if (!st->codec->extradata) {
+ if (ff_alloc_extradata(st->codec, (get_bits_left(&gb) + 7)/8)) {
ret = AVERROR(ENOMEM);
goto end;
}