summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmpcodecs/vf.h1
-rw-r--r--mencoder.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/libmpcodecs/vf.h b/libmpcodecs/vf.h
index e14a9cc174..5586108c2a 100644
--- a/libmpcodecs/vf.h
+++ b/libmpcodecs/vf.h
@@ -66,6 +66,7 @@ typedef struct vf_seteq_s
#define VFCTRL_FLIP_PAGE 10 /* Tell the vo to flip pages */
#define VFCTRL_DUPLICATE_FRAME 11 /* For encoding - encode zero-change frame */
#define VFCTRL_SKIP_NEXT_FRAME 12 /* For encoding - drop the next frame that passes thru */
+#define VFCTRL_FLUSH_FRAMES 13 /* For encoding - flush delayed frames */
#include "vfcap.h"
diff --git a/mencoder.c b/mencoder.c
index 5cdc5104fc..d1cde38f53 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -1573,6 +1573,14 @@ if(sh_audio && !demuxer2){
} // while(!at_eof)
+/* Emit the remaining frames in the video system */
+/*TODO emit frmaes delayed by decoder lag*/
+ if(sh_video && sh_video->vfilter){
+ mp_msg(MSGT_FIXME, MSGL_FIXME, "\nFlushing video frames\n");
+ ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter,
+ VFCTRL_FLUSH_FRAMES, 0);
+ }
+
#ifdef HAVE_MP3LAME
// fixup CBR mp3 audio header:
if(sh_audio && mux_a->codec==ACODEC_VBRMP3 && !lame_param_vbr){