summaryrefslogtreecommitdiffstats
path: root/sub/dec_sub.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-01-09 23:04:38 +0100
committerwm4 <wm4@nowhere>2014-01-09 23:04:38 +0100
commitcf02369aaf846d1d383498c9aa75bb6cb73ae004 (patch)
tree6c2b9c5a9e12f844531bc8a28779defe1a350eb8 /sub/dec_sub.c
parent09bf69afdb9e3d8b1410d82a30f23728d9af2ee7 (diff)
downloadmpv-cf02369aaf846d1d383498c9aa75bb6cb73ae004.tar.bz2
mpv-cf02369aaf846d1d383498c9aa75bb6cb73ae004.tar.xz
sub: fix frame based subtitle timestamp handling
Subtitle formats with frame based timing require using the video FPS to compute proper subtitle timestamps. But it looks like the calculation to do that was inversed.
Diffstat (limited to 'sub/dec_sub.c')
-rw-r--r--sub/dec_sub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sub/dec_sub.c b/sub/dec_sub.c
index d94d1f0567..102a048da3 100644
--- a/sub/dec_sub.c
+++ b/sub/dec_sub.c
@@ -420,7 +420,7 @@ bool sub_read_all_packets(struct dec_sub *sub, struct sh_stream *sh)
// 23.976 FPS is used as default timebase for frame based formats
if (sub->video_fps && sh->sub->frame_based)
- sub_speed *= sub->video_fps / 23.976;
+ sub_speed *= 23.976 / sub->video_fps;
if (opts->sub_fps && sub->video_fps)
sub_speed *= opts->sub_fps / sub->video_fps;