Message ID | tencent_9900C64C70C6ECB7BC80E55C21AF6CA01807@qq.com |
---|---|
State | Accepted |
Commit | 6caf34dbe0f0e406c49394c6c6552cc1345957b7 |
Headers | show |
Series | [FFmpeg-devel] fftool/ffplay: avoid same name in local variable | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
> -----Original Message----- > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of xufuji456 via ffmpeg-devel > Sent: 2023年12月30日 16:41 > To: ffmpeg-devel@ffmpeg.org > Cc: xufuji456 <839789740@qq.com> > Subject: [FFmpeg-devel] [PATCH] fftool/ffplay: avoid same name in local variable > > There is a warning in XCode:"Declaration shadows a local variable" > > Signed-off-by: xufuji456 <839789740@qq.com> > --- > fftools/ffplay.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/fftools/ffplay.c b/fftools/ffplay.c > index ea5ff31393..17861e60be 100644 > --- a/fftools/ffplay.c > +++ b/fftools/ffplay.c > @@ -1930,11 +1930,11 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c > if (sd) > displaymatrix = (int32_t *)sd->data; > if (!displaymatrix) { > - const AVPacketSideData *sd = av_packet_side_data_get(is->video_st->codecpar->coded_side_data, > - is->video_st->codecpar->nb_coded_side_data, > - AV_PKT_DATA_DISPLAYMATRIX); > - if (sd) > - displaymatrix = (int32_t *)sd->data; > + const AVPacketSideData *psd = av_packet_side_data_get(is->video_st->codecpar->coded_side_data, > + is->video_st->codecpar->nb_coded_side_data, > + AV_PKT_DATA_DISPLAYMATRIX); > + if (psd) > + displaymatrix = (int32_t *)psd->data; > } > theta = get_rotation(displaymatrix); LGTM. The commit message could be reworded like "fix a variable shadowing".
> On Dec 30, 2023, at 23:21, Zhao Zhili <quinkblack@foxmail.com> wrote: > >> -----Original Message----- >> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of xufuji456 via ffmpeg-devel >> Sent: 2023年12月30日 16:41 >> To: ffmpeg-devel@ffmpeg.org >> Cc: xufuji456 <839789740@qq.com> >> Subject: [FFmpeg-devel] [PATCH] fftool/ffplay: avoid same name in local variable >> >> There is a warning in XCode:"Declaration shadows a local variable" >> >> Signed-off-by: xufuji456 <839789740@qq.com> >> --- >> fftools/ffplay.c | 10 +++++----- >> 1 file changed, 5 insertions(+), 5 deletions(-) >> >> > > LGTM. The commit message could be reworded like "fix a variable shadowing". Applied, thanks! > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org <mailto:ffmpeg-devel@ffmpeg.org> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org <mailto:ffmpeg-devel-request@ffmpeg.org> with subject "unsubscribe".
diff --git a/fftools/ffplay.c b/fftools/ffplay.c index ea5ff31393..17861e60be 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -1930,11 +1930,11 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c if (sd) displaymatrix = (int32_t *)sd->data; if (!displaymatrix) { - const AVPacketSideData *sd = av_packet_side_data_get(is->video_st->codecpar->coded_side_data, - is->video_st->codecpar->nb_coded_side_data, - AV_PKT_DATA_DISPLAYMATRIX); - if (sd) - displaymatrix = (int32_t *)sd->data; + const AVPacketSideData *psd = av_packet_side_data_get(is->video_st->codecpar->coded_side_data, + is->video_st->codecpar->nb_coded_side_data, + AV_PKT_DATA_DISPLAYMATRIX); + if (psd) + displaymatrix = (int32_t *)psd->data; } theta = get_rotation(displaymatrix);
There is a warning in XCode:"Declaration shadows a local variable" Signed-off-by: xufuji456 <839789740@qq.com> --- fftools/ffplay.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)