diff options
author | 2004-10-09 13:07:18 +0000 | |
---|---|---|
committer | 2004-10-09 13:07:18 +0000 | |
commit | e5b4b495c38856a740dd2fcbbc030b87218eb8fc (patch) | |
tree | 8b1e96cdd6ca5f0a49ef7488d1eddc9317bfd15e | |
parent | f218ab594dcb3e0bc28d5e917fbb74dd83115741 (diff) |
add new control message, that is send after end of stream, to flush all remaining frames in the video system
required by xvid4 encoder.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13594 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpcodecs/vf.h | 1 | ||||
-rw-r--r-- | mencoder.c | 8 |
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){ |