From 1b253f931b4142cd574554d1b89f2a055df1dce5 Mon Sep 17 00:00:00 2001 From: rfelker Date: Wed, 28 Apr 2004 04:02:46 +0000 Subject: "hard" frame duplication for mencoder. this finally makes it possible to generate valid mpeg output from avi's that have duplicate frames in them, or when using inverse telecine filters. to use it, put the "harddup" filter at the end of your filter chain. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12335 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mencoder.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mencoder.c') diff --git a/mencoder.c b/mencoder.c index e8d8b11d8a..0a347f3ba8 100644 --- a/mencoder.c +++ b/mencoder.c @@ -189,6 +189,7 @@ float sub_last_pts = -303; #endif int auto_expand=1; +int encode_duplicates=1; // infos are empty by default char *info_name=NULL; @@ -1312,7 +1313,8 @@ if(skip_flag<0){ if(file_format != DEMUXER_TYPE_TV && !verbose) printf(MSGTR_DuplicateFrames,-skip_flag); while(skip_flag<0){ duplicatedframes++; - muxer_write_chunk(mux_v,0,0); + if (!encode_duplicates || vf_next_control(sh_video->vfilter, VFCTRL_DUPLICATE_FRAME, 0) != CONTROL_TRUE) + muxer_write_chunk(mux_v,0,0); ++skip_flag; } } else -- cgit v1.2.3