Commit 0ac3befd authored by Thierry Foucu's avatar Thierry Foucu Committed by Michael Niedermayer

fftools/ffmpeg: Check if we do have also a filter_complex filter.

Right now, the code check for no filter description, but if we use a
filter_complex, the code will use the AVFrame.duration which could be
wrong in case of using fps filter.

How to reproduce the problem:
ffmpeg -f lavfi -i testsrc=duration=1 -vf fps=fps=50 -vsync 1 -f null -
output 50 frames

ffmpeg -f lavfi -i testsrc=duration=1 -filter_complex fps=fps=50 -vsync 1 -f null -
output 51 frames

With this commit, the same command will always output 50 frames.
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent c47fada2
...@@ -1079,6 +1079,7 @@ static void do_video_out(OutputFile *of, ...@@ -1079,6 +1079,7 @@ static void do_video_out(OutputFile *of,
if (!ost->filters_script && if (!ost->filters_script &&
!ost->filters && !ost->filters &&
(nb_filtergraphs == 0 || !filtergraphs[0]->graph_desc) &&
next_picture && next_picture &&
ist && ist &&
lrintf(next_picture->pkt_duration * av_q2d(ist->st->time_base) / av_q2d(enc->time_base)) > 0) { lrintf(next_picture->pkt_duration * av_q2d(ist->st->time_base) / av_q2d(enc->time_base)) > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment