From 2ed4660960312256e320e108eb81dcd40b74f55b Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Sat, 21 Feb 2026 16:03:49 +0100 Subject: [PATCH] avformat/rtpenc_mpegts: Fix shadowing Signed-off-by: Andreas Rheinhardt --- libavformat/rtpenc_mpegts.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavformat/rtpenc_mpegts.c b/libavformat/rtpenc_mpegts.c index 897db10f76..4414d2047c 100644 --- a/libavformat/rtpenc_mpegts.c +++ b/libavformat/rtpenc_mpegts.c @@ -60,7 +60,7 @@ static int rtp_mpegts_write_header(AVFormatContext *s) MuxChain *chain = s->priv_data; AVFormatContext *mpegts_ctx = NULL, *rtp_ctx = NULL; int i, ret = AVERROR(ENOMEM); - AVStream *st; + AVStream *new_st; AVDictionary *mpegts_muxer_options = NULL; AVDictionary *rtp_muxer_options = NULL; @@ -106,14 +106,14 @@ static int rtp_mpegts_write_header(AVFormatContext *s) } EXTERN const FFOutputFormat ff_rtp_muxer; rtp_ctx->oformat = &ff_rtp_muxer.p; - st = avformat_new_stream(rtp_ctx, NULL); - if (!st) { + new_st = avformat_new_stream(rtp_ctx, NULL); + if (!new_st) { ret = AVERROR(ENOMEM); goto fail; } - st->time_base.num = 1; - st->time_base.den = 90000; - st->codecpar->codec_id = AV_CODEC_ID_MPEG2TS; + new_st->time_base.num = 1; + new_st->time_base.den = 90000; + new_st->codecpar->codec_id = AV_CODEC_ID_MPEG2TS; rtp_ctx->pb = s->pb; av_dict_copy(&rtp_muxer_options, chain->rtp_muxer_options, 0); ret = avformat_write_header(rtp_ctx, &rtp_muxer_options);