[xiph-commits] r14842 - trunk/ffmpeg2theora
j at svn.xiph.org
j at svn.xiph.org
Tue May 6 15:36:56 PDT 2008
Author: j
Date: 2008-05-06 15:36:55 -0700 (Tue, 06 May 2008)
New Revision: 14842
Modified:
trunk/ffmpeg2theora/ffmpeg2theora.c
Log:
fixes #1340 calculate frames to encode with target framerate
Modified: trunk/ffmpeg2theora/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/ffmpeg2theora.c 2008-05-06 22:28:05 UTC (rev 14841)
+++ trunk/ffmpeg2theora/ffmpeg2theora.c 2008-05-06 22:36:55 UTC (rev 14842)
@@ -1048,12 +1048,7 @@
}
}
}
- /*check for end time and calculate number of frames to encode*/
- no_frames = fps*(this->end_time - this->start_time);
- if(this->end_time > 0 && no_frames <= 0){
- fprintf(stderr,"End time has to be bigger than start time.\n");
- exit(1);
- }
+
if(info.audio_only && (this->end_time>0 || this->start_time>0)){
fprintf(stderr,"Sorry, right now start/end time does not work for audio only files.\n");
exit(1);
@@ -1066,6 +1061,12 @@
this->fps = framerate_new;
}
+ /*check for end time and calculate number of frames to encode*/
+ no_frames = this->fps*(this->end_time - this->start_time);
+ if(this->end_time > 0 && no_frames <= 0){
+ fprintf(stderr,"End time has to be bigger than start time.\n");
+ exit(1);
+ }
/* main decoding loop */
do{
if(no_frames > 0){
More information about the commits
mailing list