avformat/movenc: fix loop variable shadowing in LCEVC stream group init

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
Zhao Zhili 2026-03-16 11:38:59 +08:00 committed by James Almer
parent 3e8bec7871
commit cc866fb5e9

View file

@ -8442,13 +8442,14 @@ static int mov_init(AVFormatContext *s)
AVStream *st = stg->streams[lcevc->lcevc_index];
MOVTrack *track = st->priv_data;
for (i = 0; i < mov->nb_tracks; i++) {
MOVTrack *trk = &mov->tracks[i];
for (int j = 0; j < mov->nb_tracks; j++) {
MOVTrack *trk = &mov->tracks[j];
if (trk->st == stg->streams[!lcevc->lcevc_index])
if (trk->st == stg->streams[!lcevc->lcevc_index]) {
track->src_track = j;
break;
}
}
track->src_track = i;
track->par->width = lcevc->width;
track->par->height = track->height = lcevc->height;