[xiph-commits] r16783 - trunk/ffmpeg2theora/src
j at svn.xiph.org
j at svn.xiph.org
Thu Jan 14 10:07:37 PST 2010
Author: j
Date: 2010-01-14 10:07:37 -0800 (Thu, 14 Jan 2010)
New Revision: 16783
Modified:
trunk/ffmpeg2theora/src/ffmpeg2theora.c
Log:
use stream.time_base for subtitles to keep time from input if possible, patch by ogg.k
Modified: trunk/ffmpeg2theora/src/ffmpeg2theora.c
===================================================================
--- trunk/ffmpeg2theora/src/ffmpeg2theora.c 2010-01-14 04:27:13 UTC (rev 16782)
+++ trunk/ffmpeg2theora/src/ffmpeg2theora.c 2010-01-14 18:07:37 UTC (rev 16783)
@@ -1217,8 +1217,15 @@
ki->gps_denominator = this->framerate_new.den;
}
else {
- ki->gps_numerator = vstream_fps.num;
- ki->gps_denominator = vstream_fps.den;
+ AVStream *stream = this->context->streams[ks->stream_index];
+ if (stream->time_base.num > 0) {
+ ki->gps_numerator = stream->time_base.den;
+ ki->gps_denominator = stream->time_base.num;
+ }
+ else {
+ ki->gps_numerator = vstream_fps.num;
+ ki->gps_denominator = vstream_fps.den;
+ }
}
}
ki->granule_shift = 32;
More information about the commits
mailing list