From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Subject: [FFmpeg-devel] [PATCH 06/12] avcodec/aac/aacdec: Avoid branch to set sample_fmt Date: Mon, 6 May 2024 14:14:28 +0200 Message-ID: <GV1P250MB0737B88A7575C525736EC20F8F1C2@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw) In-Reply-To: <GV1P250MB0737A4218AC17DD0A60E579C8F1C2@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/aac/aacdec.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c index a78a669602..1dc4af8a0d 100644 --- a/libavcodec/aac/aacdec.c +++ b/libavcodec/aac/aacdec.c @@ -1200,11 +1200,6 @@ static av_cold int aac_decode_init_internal(AVCodecContext *avctx) ac->avctx = avctx; ac->oc[1].m4ac.sample_rate = avctx->sample_rate; - if (ac->is_fixed) - avctx->sample_fmt = AV_SAMPLE_FMT_S32P; - else - avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; - if (avctx->extradata_size > 0) { if ((ret = decode_audio_specific_config(ac, ac->avctx, &ac->oc[1].m4ac, avctx->extradata, @@ -1254,14 +1249,20 @@ static av_cold int aac_decode_init_internal(AVCodecContext *avctx) static av_cold int aac_decode_init(AVCodecContext *avctx) { AACDecContext *ac = avctx->priv_data; + ac->is_fixed = 0; + avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; + return aac_decode_init_internal(avctx); } static av_cold int aac_decode_init_fixed(AVCodecContext *avctx) { AACDecContext *ac = avctx->priv_data; + ac->is_fixed = 1; + avctx->sample_fmt = AV_SAMPLE_FMT_S32P; + return aac_decode_init_internal(avctx); } -- 2.40.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2024-05-06 12:15 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-05-06 9:29 [FFmpeg-devel] [PATCH 1/3] avcodec/aactab: Provide ff_ltp_coef, ff_tns_tmp2_map unconditionally Andreas Rheinhardt 2024-05-06 9:30 ` [FFmpeg-devel] [PATCH 2/3] avcodec/aacsbr: Fix type mismatch Andreas Rheinhardt 2024-05-06 17:54 ` Lynne 2024-05-06 9:30 ` [FFmpeg-devel] [PATCH 3/3] avcodec/aac/aacdec: Fix linking errors with only one decoder enabled Andreas Rheinhardt 2024-05-06 14:03 ` [FFmpeg-devel] [PATCH v2 3/12] " Andreas Rheinhardt 2024-05-06 17:53 ` [FFmpeg-devel] [PATCH 3/3] " Lynne 2024-05-06 19:39 ` Andreas Rheinhardt 2024-05-06 20:00 ` Lynne 2024-05-06 20:08 ` Andreas Rheinhardt 2024-05-06 12:14 ` [FFmpeg-devel] [PATCH 04/12] avcodec/aac/aacdec: Remove unnecessary ff_thread_once() Andreas Rheinhardt 2024-05-06 12:14 ` [FFmpeg-devel] [PATCH 05/12] avcodec/aac/aacdec: Move channel number check out of init_dsp() Andreas Rheinhardt 2024-05-06 12:14 ` Andreas Rheinhardt [this message] 2024-05-06 12:14 ` [FFmpeg-devel] [PATCH 07/12] avcodec/aac/aacdec_float: Call ff_aac_float_common_init() only once Andreas Rheinhardt 2024-05-06 12:14 ` [FFmpeg-devel] [PATCH 08/12] avcodec/aac/aacdec_(fixed|float): Avoid AAC_RENAME, INTFLOAT Andreas Rheinhardt 2024-05-06 12:14 ` [FFmpeg-devel] [PATCH 09/12] avcodec/aac/aacdec: Mark flush as cold Andreas Rheinhardt 2024-05-06 12:14 ` [FFmpeg-devel] [PATCH 10/12] avcodec/aac/aacdec: Avoid compiling latm decoder if disabled Andreas Rheinhardt 2024-05-06 12:14 ` [FFmpeg-devel] [PATCH 11/12] avcodec/aac/aacdec: Move init functions to aacdec_fixed/float Andreas Rheinhardt 2024-05-06 12:14 ` [FFmpeg-devel] [PATCH 12/12] avcodec/aac/aacdec_(fixed|float): Set AACDecDSP, AACDecProc directly Andreas Rheinhardt 2024-05-06 17:59 ` Lynne
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=GV1P250MB0737B88A7575C525736EC20F8F1C2@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \ --to=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git