# HG changeset patch # User iive # Date 1305987987 0 # Node ID 25880d57740d6cd97b4986aa521b16f2dcd6e55b # Parent 1aac4a6026fa94c984600d849b3adfdd34b11720 Fix stepping forward/backward in subtitle list after commit r31663. The sub_delay polarity have been changed in r31663, but the calculation of the timestamps in step_sub() haven't been changed to reflect it. As result stepping seemed to have some effect, but the subtitles seemed to oscillate in strange patterns. Fixes bug 1858. diff -r 1aac4a6026fa -r 25880d57740d sub/find_sub.c --- a/sub/find_sub.c Sat May 21 09:12:16 2011 +0000 +++ b/sub/find_sub.c Sat May 21 14:26:27 2011 +0000 @@ -44,7 +44,7 @@ if (subd == NULL) return; subs = subd->subtitles; - key = (pts+sub_delay) * (subd->sub_uses_time ? 100 : sub_fps); + key = (pts-sub_delay) * (subd->sub_uses_time ? 100 : sub_fps); /* Tell the OSD subsystem that the OSD contents will change soon */ vo_osd_changed(OSDTYPE_SUBTITLE); @@ -64,7 +64,7 @@ movement = subd->sub_num - current_sub - 1; current_sub += movement; - sub_delay = subs[current_sub].start / (subd->sub_uses_time ? 100 : sub_fps) - pts; + sub_delay = pts - subs[current_sub].start / (subd->sub_uses_time ? 100 : sub_fps); } void find_sub(sub_data* subd,int key){