mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
fftools/ffmpeg_filter: sanitize framerate retrieved from the filtergraph
Lavfi uses 1/0 to signal unknown/VFR, which should not be passed to encoders.
This commit is contained in:
parent
d65d0f4df1
commit
82dd4dbe3f
@ -1805,8 +1805,11 @@ int reap_filters(FilterGraph *fg, int flush)
|
||||
if (!fgp->is_meta)
|
||||
fd->bits_per_raw_sample = 0;
|
||||
|
||||
if (ost->type == AVMEDIA_TYPE_VIDEO)
|
||||
fd->frame_rate_filter = av_buffersink_get_frame_rate(filter);
|
||||
if (ost->type == AVMEDIA_TYPE_VIDEO) {
|
||||
AVRational fr = av_buffersink_get_frame_rate(filter);
|
||||
if (fr.num > 0 && fr.den > 0)
|
||||
fd->frame_rate_filter = fr;
|
||||
}
|
||||
|
||||
ret = enc_frame(ost, filtered_frame);
|
||||
av_frame_unref(filtered_frame);
|
||||
|
Loading…
Reference in New Issue
Block a user