diff options
author | James Almer <jamrial@gmail.com> | 2022-07-19 08:27:48 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-07-22 09:19:11 -0300 |
commit | 5114ce1e2a4c71ddf4971ad3cf9bd43ae16571c3 (patch) | |
tree | 8f750638b50e1b2ad4e5e2f21fada7d67fe0f56d /libavcodec | |
parent | 130d19bf2044ac76372d1b97ab87ab283c8b37f8 (diff) |
avcodec/aacdec: remove skip samples multiplier
The amount of padding samples reported by containers take into account the
extended samplerate in HE-AAC.
Fixes ticket #9671.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/aacdec_template.c | 3 | ||||
-rw-r--r-- | libavcodec/avcodec.c | 2 | ||||
-rw-r--r-- | libavcodec/decode.c | 2 | ||||
-rw-r--r-- | libavcodec/internal.h | 2 |
4 files changed, 1 insertions, 8 deletions
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c index 10fba3d3b2..119976aa19 100644 --- a/libavcodec/aacdec_template.c +++ b/libavcodec/aacdec_template.c @@ -3418,9 +3418,6 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame, ac->oc[1].status = OC_LOCKED; } - if (multiplier) - avctx->internal->skip_samples_multiplier = 2; - if (!ac->frame->data[0] && samples) { av_log(avctx, AV_LOG_ERROR, "no frame data found\n"); err = AVERROR_INVALIDDATA; diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index fb11440e5d..4bc18183a9 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -161,8 +161,6 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code goto free_and_end; } - avci->skip_samples_multiplier = 1; - if (codec2->priv_data_size > 0) { if (!avctx->priv_data) { avctx->priv_data = av_mallocz(codec2->priv_data_size); diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 14ce4c2e2f..0613681f89 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -359,7 +359,7 @@ FF_ENABLE_DEPRECATION_WARNINGS side= av_packet_get_side_data(avci->last_pkt_props, AV_PKT_DATA_SKIP_SAMPLES, &side_size); if(side && side_size>=10) { - avci->skip_samples = AV_RL32(side) * avci->skip_samples_multiplier; + avci->skip_samples = AV_RL32(side); avci->skip_samples = FFMAX(0, avci->skip_samples); discard_padding = AV_RL32(side + 4); av_log(avctx, AV_LOG_DEBUG, "skip %d / discard %d samples due to side data\n", diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 17e1de8127..6fb4e1b9af 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -133,8 +133,6 @@ typedef struct AVCodecInternal { int showed_multi_packet_warning; - int skip_samples_multiplier; - /* to prevent infinite loop on errors when draining */ int nb_draining_errors; |