summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-17 04:38:32 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-04 02:40:41 +0100
commit77f326dc36b7b600e5aef6b7dca83e8053d9954d (patch)
treefceb50f0aa9e9491378e2a14dbc9326af3c4b89b /ffmpeg.c
parent52f2adc015ba4a05c3da730e87b63b343747424d (diff)
ffmpeg: Make CFR frame drop threshold user adjustable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 9cff55714c..fd45afb837 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -962,7 +962,9 @@ static void do_video_out(AVFormatContext *s,
}
case VSYNC_CFR:
// FIXME set to 0.5 after we fix some dts/pts bugs like in avidec.c
- if (delta < -1.1)
+ if (frame_drop_threshold && delta < frame_drop_threshold && ost->frame_number) {
+ nb_frames = 0;
+ } else if (delta < -1.1)
nb_frames = 0;
else if (delta > 1.1) {
nb_frames = lrintf(delta);