summaryrefslogtreecommitdiffstats
path: root/mencoder.c
diff options
context:
space:
mode:
authorrfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-23 07:37:55 +0000
committerrfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-23 07:37:55 +0000
commitf14a68b53ecbfd600380550b179b0c7a6ad34563 (patch)
tree6e4b4fcf978eaf92b46a5dd8c831b0ce001ac781 /mencoder.c
parent98c0ee2923ec35fdee3d3b743ede6c4baa2aed8c (diff)
downloadmpv-f14a68b53ecbfd600380550b179b0c7a6ad34563.tar.bz2
mpv-f14a68b53ecbfd600380550b179b0c7a6ad34563.tar.xz
honor decoder's/filter's decision to remove frames when using -noskip.
this may go against the original intention of the vf layer, but it's how all the filters that drop frames have been written to work, so it's now the de-facto standard. without this patch, -noskip will result in tons of duplicate frames (either soft or hard duplicates) and a/v desync whenever decimation, ivtc, etc. is used. even with this patch -noskip is still a bad idea for most of these purposes, but it will work reliably with filmdint, framestep, and some other filters with fixed in:out ratios as long as the right -ofps value is used. without this patch, there is no hope of -noskip working with frame-dropping filters. (this patch was previously committed erroneously as part of another change, then reversed. it is now being committed again.) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16830 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mencoder.c')
-rw-r--r--mencoder.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mencoder.c b/mencoder.c
index 924f38890f..c82911317e 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -1300,6 +1300,8 @@ default:
badframes++;
if(skip_flag<=0){
// unwanted skipping of a frame, what to do?
+ v_timer_corr-=(float)mux_v->h.dwScale/mux_v->h.dwRate;
+#if 0
if(skip_limit==0){
// skipping not allowed -> write empty frame:
if (!encode_duplicates || !sh_video->vfilter || ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_DUPLICATE_FRAME, 0) != CONTROL_TRUE)
@@ -1308,6 +1310,7 @@ default:
// skipping allowed -> skip it and distriubute timer error:
v_timer_corr-=(float)mux_v->h.dwScale/mux_v->h.dwRate;
}
+#endif
}
}
}