Message ID | HE1PR0301MB2154662D42D7562E71007E128F5E9@HE1PR0301MB2154.eurprd03.prod.outlook.com |
---|---|
State | Accepted |
Commit | 4796ec5d4ea00a86f9f6732653469e682e5266da |
Headers | show |
Series | [FFmpeg-devel] avformat/dump: Remove remnants of codec timebase | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
On 4/29/2021 9:45 PM, Andreas Rheinhardt wrote: > Fixes Coverity issue #1477414. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> > --- > libavformat/dump.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/libavformat/dump.c b/libavformat/dump.c > index 9f54bc3e8d..04c93dd7d3 100644 > --- a/libavformat/dump.c > +++ b/libavformat/dump.c > @@ -564,17 +564,16 @@ static void dump_stream_format(const AVFormatContext *ic, int i, > int fps = st->avg_frame_rate.den && st->avg_frame_rate.num; > int tbr = st->r_frame_rate.den && st->r_frame_rate.num; > int tbn = st->time_base.den && st->time_base.num; > - int tbc = 0; > > - if (fps || tbr || tbn || tbc) > + if (fps || tbr || tbn) > av_log(NULL, AV_LOG_INFO, "%s", separator); > > if (fps) > - print_fps(av_q2d(st->avg_frame_rate), tbr || tbn || tbc ? "fps, " : "fps"); > + print_fps(av_q2d(st->avg_frame_rate), tbr || tbn ? "fps, " : "fps"); > if (tbr) > - print_fps(av_q2d(st->r_frame_rate), tbn || tbc ? "tbr, " : "tbr"); > + print_fps(av_q2d(st->r_frame_rate), tbn ? "tbr, " : "tbr"); > if (tbn) > - print_fps(1 / av_q2d(st->time_base), tbc ? "tbn, " : "tbn"); > + print_fps(1 / av_q2d(st->time_base), "tbn"); > } > > if (st->disposition & AV_DISPOSITION_DEFAULT) LGTM
diff --git a/libavformat/dump.c b/libavformat/dump.c index 9f54bc3e8d..04c93dd7d3 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -564,17 +564,16 @@ static void dump_stream_format(const AVFormatContext *ic, int i, int fps = st->avg_frame_rate.den && st->avg_frame_rate.num; int tbr = st->r_frame_rate.den && st->r_frame_rate.num; int tbn = st->time_base.den && st->time_base.num; - int tbc = 0; - if (fps || tbr || tbn || tbc) + if (fps || tbr || tbn) av_log(NULL, AV_LOG_INFO, "%s", separator); if (fps) - print_fps(av_q2d(st->avg_frame_rate), tbr || tbn || tbc ? "fps, " : "fps"); + print_fps(av_q2d(st->avg_frame_rate), tbr || tbn ? "fps, " : "fps"); if (tbr) - print_fps(av_q2d(st->r_frame_rate), tbn || tbc ? "tbr, " : "tbr"); + print_fps(av_q2d(st->r_frame_rate), tbn ? "tbr, " : "tbr"); if (tbn) - print_fps(1 / av_q2d(st->time_base), tbc ? "tbn, " : "tbn"); + print_fps(1 / av_q2d(st->time_base), "tbn"); } if (st->disposition & AV_DISPOSITION_DEFAULT)
Fixes Coverity issue #1477414. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavformat/dump.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)