mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avformat: use avpriv_mpeg4audio_get_config2()
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
d582cc17e1
commit
35bbaa6652
@ -53,7 +53,7 @@ static int adts_decode_extradata(AVFormatContext *s, ADTSContext *adts, const ui
|
|||||||
int off;
|
int off;
|
||||||
|
|
||||||
init_get_bits(&gb, buf, size * 8);
|
init_get_bits(&gb, buf, size * 8);
|
||||||
off = avpriv_mpeg4audio_get_config(&m4ac, buf, size * 8, 1);
|
off = avpriv_mpeg4audio_get_config2(&m4ac, buf, size, 1, s);
|
||||||
if (off < 0)
|
if (off < 0)
|
||||||
return off;
|
return off;
|
||||||
skip_bits_long(&gb, off);
|
skip_bits_long(&gb, off);
|
||||||
|
@ -547,8 +547,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
return ret;
|
return ret;
|
||||||
if (st->codecpar->codec_id == AV_CODEC_ID_AAC) {
|
if (st->codecpar->codec_id == AV_CODEC_ID_AAC) {
|
||||||
MPEG4AudioConfig cfg = {0};
|
MPEG4AudioConfig cfg = {0};
|
||||||
ret = avpriv_mpeg4audio_get_config(&cfg, st->codecpar->extradata,
|
ret = avpriv_mpeg4audio_get_config2(&cfg, st->codecpar->extradata,
|
||||||
st->codecpar->extradata_size * 8, 1);
|
st->codecpar->extradata_size, 1, fc);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
st->codecpar->channels = cfg.channels;
|
st->codecpar->channels = cfg.channels;
|
||||||
|
@ -62,7 +62,7 @@ static int latm_decode_extradata(AVFormatContext *s, uint8_t *buf, int size)
|
|||||||
av_log(s, AV_LOG_ERROR, "Extradata is larger than currently supported.\n");
|
av_log(s, AV_LOG_ERROR, "Extradata is larger than currently supported.\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
ctx->off = avpriv_mpeg4audio_get_config(&m4ac, buf, size * 8, 1);
|
ctx->off = avpriv_mpeg4audio_get_config2(&m4ac, buf, size, 1, s);
|
||||||
if (ctx->off < 0)
|
if (ctx->off < 0)
|
||||||
return ctx->off;
|
return ctx->off;
|
||||||
|
|
||||||
|
@ -717,8 +717,7 @@ static int get_aac_sample_rates(AVFormatContext *s, uint8_t *extradata, int extr
|
|||||||
MPEG4AudioConfig mp4ac;
|
MPEG4AudioConfig mp4ac;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = avpriv_mpeg4audio_get_config(&mp4ac, extradata,
|
ret = avpriv_mpeg4audio_get_config2(&mp4ac, extradata, extradata_size, 1, s);
|
||||||
extradata_size * 8, 1);
|
|
||||||
/* Don't abort if the failure is because of missing extradata. Assume in that
|
/* Don't abort if the failure is because of missing extradata. Assume in that
|
||||||
* case a bitstream filter will provide the muxer with the extradata in the
|
* case a bitstream filter will provide the muxer with the extradata in the
|
||||||
* first packet.
|
* first packet.
|
||||||
|
Loading…
Reference in New Issue
Block a user