mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter: let single output frame A->V filters set reasonable frame rate
This commit is contained in:
parent
7ac559b819
commit
6e45acd23b
@ -1241,6 +1241,8 @@ static int config_output(AVFilterLink *outlink)
|
|||||||
int ret = av_parse_video_rate(&s->frame_rate, s->rate_str);
|
int ret = av_parse_video_rate(&s->frame_rate, s->rate_str);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
} else if (s->single_pic) {
|
||||||
|
s->frame_rate = av_make_q(1, 1);
|
||||||
} else {
|
} else {
|
||||||
s->frame_rate = s->auto_frame_rate;
|
s->frame_rate = s->auto_frame_rate;
|
||||||
}
|
}
|
||||||
|
@ -437,6 +437,9 @@ static int config_output(AVFilterLink *outlink)
|
|||||||
outlink->h = showwaves->h;
|
outlink->h = showwaves->h;
|
||||||
outlink->sample_aspect_ratio = (AVRational){1,1};
|
outlink->sample_aspect_ratio = (AVRational){1,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},
|
outlink->frame_rate = av_div_q((AVRational){inlink->sample_rate,showwaves->n},
|
||||||
(AVRational){showwaves->w,1});
|
(AVRational){showwaves->w,1});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user