Ticket #7515: srtdiff.txt

File srtdiff.txt, 1.1 KB (added by tim@…, 14 years ago)

Patch to fix SRT subtitle timings

Line 
1Index: NuppelVideoPlayer.cpp
2===================================================================
3--- NuppelVideoPlayer.cpp       (revision 22760)
4+++ NuppelVideoPlayer.cpp       (working copy)
5@@ -1160,6 +1160,7 @@
6     if (fps > 0.0f && fps < 121.0f)
7     {
8         video_frame_rate = fps;
9+        VERBOSE(VB_PLAYBACK,QString("Set video_frame_rate %1").arg(video_frame_rate));
10         float temp_speed = (play_speed == 0.0f) ?
11             audio_stretchfactor : play_speed;
12         frame_interval = (int)(1000000.0f / video_frame_rate / temp_speed);
13@@ -7314,9 +7315,10 @@
14         // transcoding, using the raw timecode doesn't work either
15         // with DTV broadcasts where the timecode isn't zero on the
16         // first frame, and may roll over during the broadcast.
17-        playPos = (uint64_t)
18-            ((currentFrame->frameNumber / video_frame_rate) * 1000);
19+        //playPos = (uint64_t)
20+        //    ((currentFrame->frameNumber / video_frame_rate) * 1000);
21         // END HACK
22+        playPos = (uint64_t)currentFrame->timecode;
23     }
24 
25     if (!textSubtitles.HasSubtitleChanged(playPos))