Commit aea3e125 authored by Jan Gerber's avatar Jan Gerber
Browse files

use stream.time_base for subtitles to keep time from input if possible, patch by ogg.k

parent 4a25e37a
......@@ -1217,8 +1217,15 @@ void ff2theora_output(ff2theora this) {
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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment