diff options
Diffstat (limited to 'libavformat/rtpdec_latm.c')
-rw-r--r-- | libavformat/rtpdec_latm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/rtpdec_latm.c b/libavformat/rtpdec_latm.c index d22cc1d215..6be0a25d2b 100644 --- a/libavformat/rtpdec_latm.c +++ b/libavformat/rtpdec_latm.c @@ -115,16 +115,16 @@ static int parse_fmtp_config(AVStream *st, const char *value) ret = AVERROR_PATCHWELCOME; 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 + - AV_INPUT_BUFFER_PADDING_SIZE); - if (!st->codec->extradata) { + av_freep(&st->codecpar->extradata); + st->codecpar->extradata_size = (get_bits_left(&gb) + 7)/8; + st->codecpar->extradata = av_mallocz(st->codecpar->extradata_size + + AV_INPUT_BUFFER_PADDING_SIZE); + if (!st->codecpar->extradata) { ret = AVERROR(ENOMEM); goto end; } - for (i = 0; i < st->codec->extradata_size; i++) - st->codec->extradata[i] = get_bits(&gb, 8); + for (i = 0; i < st->codecpar->extradata_size; i++) + st->codecpar->extradata[i] = get_bits(&gb, 8); end: av_free(config); |