This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 6aa367b9b3b278a66eb8a546178b3a77710d17cf Author: Andreas Rheinhardt <[email protected]> AuthorDate: Sat Feb 21 14:14:45 2026 +0100 Commit: Andreas Rheinhardt <[email protected]> CommitDate: Tue Mar 10 13:52:18 2026 +0100 avformat/smacker: Fix shadowing Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavformat/smacker.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/libavformat/smacker.c b/libavformat/smacker.c index 774aad6790..e50d147cac 100644 --- a/libavformat/smacker.c +++ b/libavformat/smacker.c @@ -177,34 +177,34 @@ static int smacker_read_header(AVFormatContext *s) if (rate) { AVStream *ast = avformat_new_stream(s, NULL); - AVCodecParameters *par; if (!ast) return AVERROR(ENOMEM); + AVCodecParameters *const apar = ast->codecpar; + smk->indexes[i] = ast->index; - par = ast->codecpar; - par->codec_type = AVMEDIA_TYPE_AUDIO; + apar->codec_type = AVMEDIA_TYPE_AUDIO; if (aflag & SMK_AUD_BINKAUD) { - par->codec_id = AV_CODEC_ID_BINKAUDIO_RDFT; + apar->codec_id = AV_CODEC_ID_BINKAUDIO_RDFT; } else if (aflag & SMK_AUD_USEDCT) { - par->codec_id = AV_CODEC_ID_BINKAUDIO_DCT; + apar->codec_id = AV_CODEC_ID_BINKAUDIO_DCT; } else if (aflag & SMK_AUD_PACKED) { - par->codec_id = AV_CODEC_ID_SMACKAUDIO; - par->codec_tag = MKTAG('S', 'M', 'K', 'A'); + apar->codec_id = AV_CODEC_ID_SMACKAUDIO; + apar->codec_tag = MKTAG('S', 'M', 'K', 'A'); } else { - par->codec_id = AV_CODEC_ID_PCM_U8; + apar->codec_id = AV_CODEC_ID_PCM_U8; } - av_channel_layout_default(&par->ch_layout, + av_channel_layout_default(&apar->ch_layout, !!(aflag & SMK_AUD_STEREO) + 1); - par->sample_rate = rate; - par->bits_per_coded_sample = (aflag & SMK_AUD_16BITS) ? 16 : 8; - if (par->bits_per_coded_sample == 16 && - par->codec_id == AV_CODEC_ID_PCM_U8) - par->codec_id = AV_CODEC_ID_PCM_S16LE; + apar->sample_rate = rate; + apar->bits_per_coded_sample = (aflag & SMK_AUD_16BITS) ? 16 : 8; + if (apar->bits_per_coded_sample == 16 && + apar->codec_id == AV_CODEC_ID_PCM_U8) + apar->codec_id = AV_CODEC_ID_PCM_S16LE; else smk->duration_size[i] = 4; - avpriv_set_pts_info(ast, 64, 1, par->sample_rate * par->ch_layout.nb_channels - * par->bits_per_coded_sample / 8); + avpriv_set_pts_info(ast, 64, 1, apar->sample_rate * apar->ch_layout.nb_channels + * apar->bits_per_coded_sample / 8); } } _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
