[xiph-commits] r10002 - trunk/ffmpeg2theora

j at svn.xiph.org j at svn.xiph.org
Thu Sep 8 04:59:37 PDT 2005


Author: j
Date: 2005-09-08 04:59:34 -0700 (Thu, 08 Sep 2005)
New Revision: 10002

Modified:
   trunk/ffmpeg2theora/ffmpeg2theora.c
Log:
only call av_seek_frame if needed

Modified: trunk/ffmpeg2theora/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/ffmpeg2theora.c	2005-09-08 11:57:46 UTC (rev 10001)
+++ trunk/ffmpeg2theora/ffmpeg2theora.c	2005-09-08 11:59:34 UTC (rev 10002)
@@ -484,12 +484,10 @@
         info.vorbis_quality = this->audio_quality;
         info.vorbis_bitrate = this->audio_bitrate;
         oggmux_init (&info);
-        /*seek to start time*/    
-#if LIBAVFORMAT_BUILD <= 4616
-        av_seek_frame( this->context, -1, (int64_t)AV_TIME_BASE*this->start_time);
-#else
-        av_seek_frame( this->context, -1, (int64_t)AV_TIME_BASE*this->start_time, 1);
-#endif
+        /*seek to start time*/
+        if(this->start_time) {
+          av_seek_frame( this->context, -1, (int64_t)AV_TIME_BASE*this->start_time, 1);
+        }
         /*check for end time and caclulate number of frames to encode*/
         no_frames = fps*(this->end_time - this->start_time);
         if(this->end_time > 0 && no_frames <= 0){



More information about the commits mailing list