Mercurial > mplayer.hg
comparison mencoder.c @ 12334:eeddcef4fb08
"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.
author | rfelker |
---|---|
date | Wed, 28 Apr 2004 04:02:46 +0000 |
parents | e7c8200ffdc5 |
children | 6f1b4c989914 |
comparison
equal
deleted
inserted
replaced
12333:80036bf4a9f5 | 12334:eeddcef4fb08 |
---|---|
187 static sub_data* subdata=NULL; | 187 static sub_data* subdata=NULL; |
188 float sub_last_pts = -303; | 188 float sub_last_pts = -303; |
189 #endif | 189 #endif |
190 | 190 |
191 int auto_expand=1; | 191 int auto_expand=1; |
192 int encode_duplicates=1; | |
192 | 193 |
193 // infos are empty by default | 194 // infos are empty by default |
194 char *info_name=NULL; | 195 char *info_name=NULL; |
195 char *info_artist=NULL; | 196 char *info_artist=NULL; |
196 char *info_genre=NULL; | 197 char *info_genre=NULL; |
1310 if(skip_flag<0){ | 1311 if(skip_flag<0){ |
1311 // duplicate frame | 1312 // duplicate frame |
1312 if(file_format != DEMUXER_TYPE_TV && !verbose) printf(MSGTR_DuplicateFrames,-skip_flag); | 1313 if(file_format != DEMUXER_TYPE_TV && !verbose) printf(MSGTR_DuplicateFrames,-skip_flag); |
1313 while(skip_flag<0){ | 1314 while(skip_flag<0){ |
1314 duplicatedframes++; | 1315 duplicatedframes++; |
1315 muxer_write_chunk(mux_v,0,0); | 1316 if (!encode_duplicates || vf_next_control(sh_video->vfilter, VFCTRL_DUPLICATE_FRAME, 0) != CONTROL_TRUE) |
1317 muxer_write_chunk(mux_v,0,0); | |
1316 ++skip_flag; | 1318 ++skip_flag; |
1317 } | 1319 } |
1318 } else | 1320 } else |
1319 if(skip_flag>0){ | 1321 if(skip_flag>0){ |
1320 // skip frame | 1322 // skip frame |