aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/avf_showwaves.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2022-04-10 22:39:12 +0200
committerPaul B Mahol <onemda@gmail.com>2022-04-10 22:41:26 +0200
commit6e45acd23b6b5062f548c2551b1a64cc268eb787 (patch)
tree72f0b8f852b9ea2d441b1468ef2251bc5a3bf8d4 /libavfilter/avf_showwaves.c
parent7ac559b819070b1d0a1111e7b80e35b9f1fb4cf3 (diff)
downloadffmpeg-6e45acd23b6b5062f548c2551b1a64cc268eb787.tar.gz
avfilter: let single output frame A->V filters set reasonable frame rate
Diffstat (limited to 'libavfilter/avf_showwaves.c')
-rw-r--r--libavfilter/avf_showwaves.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index f491277ce1..76399ab13d 100644
--- a/libavfilter/avf_showwaves.c
+++ b/libavfilter/avf_showwaves.c
@@ -437,8 +437,11 @@ static int config_output(AVFilterLink *outlink)
outlink->h = showwaves->h;
outlink->sample_aspect_ratio = (AVRational){1,1};
- outlink->frame_rate = av_div_q((AVRational){inlink->sample_rate,showwaves->n},
- (AVRational){showwaves->w,1});
+ if (showwaves->single_pic)
+ outlink->frame_rate = av_make_q(1, 1);
+ else
+ outlink->frame_rate = av_div_q((AVRational){inlink->sample_rate,showwaves->n},
+ (AVRational){showwaves->w,1});
av_log(ctx, AV_LOG_VERBOSE, "s:%dx%d r:%f n:%d\n",
showwaves->w, showwaves->h, av_q2d(outlink->frame_rate), showwaves->n);