# HG changeset patch # User iive # Date 1097327238 0 # Node ID e2dca00374f23ac9f9af2539d21a0820fd490187 # Parent 970eef87a388f64cb006461810c3310ec92332ad add new control message, that is send after end of stream, to flush all remaining frames in the video system required by xvid4 encoder. diff -r 970eef87a388 -r e2dca00374f2 libmpcodecs/vf.h --- a/libmpcodecs/vf.h Sat Oct 09 08:11:16 2004 +0000 +++ b/libmpcodecs/vf.h Sat Oct 09 13:07:18 2004 +0000 @@ -66,6 +66,7 @@ #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 -r 970eef87a388 -r e2dca00374f2 mencoder.c --- a/mencoder.c Sat Oct 09 08:11:16 2004 +0000 +++ b/mencoder.c Sat Oct 09 13:07:18 2004 +0000 @@ -1573,6 +1573,14 @@ } // 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){