0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

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
This commit is contained in:
iive 2004-10-09 13:07:18 +00:00
parent f218ab594d
commit e5b4b495c3
2 changed files with 9 additions and 0 deletions

View File

@ -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"

View File

@ -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){