[xiph-commits] r17355 - trunk/ffmpeg2theora/src
j at svn.xiph.org
j at svn.xiph.org
Thu Jul 29 03:33:14 PDT 2010
Author: j
Date: 2010-07-29 03:33:14 -0700 (Thu, 29 Jul 2010)
New Revision: 17355
Modified:
trunk/ffmpeg2theora/src/ffmpeg2theora.c
Log:
add context->start_time to start_time for seeking
Modified: trunk/ffmpeg2theora/src/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/src/ffmpeg2theora.c 2010-07-28 19:57:11 UTC (rev 17354)
+++ trunk/ffmpeg2theora/src/ffmpeg2theora.c 2010-07-29 10:33:14 UTC (rev 17355)
@@ -1293,7 +1293,11 @@
oggmux_init(&info);
/*seek to start time*/
if (this->start_time) {
- av_seek_frame( this->context, -1, (int64_t)AV_TIME_BASE*this->start_time, 1);
+ int64_t timestamp = this->start_time * AV_TIME_BASE;
+ /* add the stream start time */
+ if (this->context->start_time != AV_NOPTS_VALUE)
+ timestamp += this->context->start_time;
+ av_seek_frame( this->context, -1, timestamp, AVSEEK_FLAG_BACKWARD);
/* discard subtitles by their end time, so we still have those that start before the start time,
but end after it */
if (info.passno != 1) {
More information about the commits
mailing list