File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -809,10 +809,12 @@ int playRvid(const char* filename) {
809809 }
810810
811811 if (rvidHasSound) {
812- // Ensure video and audio stay in sync
813812 soundBufferReadLen = rvidSampleRate;
814- for (int i = 0 ; i < rvidSampleRate; i += 1000 ) {
815- soundBufferReadLen++;
813+ if (rvidReduceFpsBy01) {
814+ // Ensure video and audio stay in sync
815+ for (int i = 0 ; i < rvidSampleRate; i += 1000 ) {
816+ soundBufferReadLen++;
817+ }
816818 }
817819
818820 rvidSound = fopen (filename, " rb" );
@@ -905,7 +907,9 @@ int playRvid(const char* filename) {
905907 IPC_SendSync (1 );
906908 } else {
907909 frameOfRefreshRateLimit = 60 ;
908- IPC_SendSync (2 );
910+ if (!rvidReduceFpsBy01) {
911+ IPC_SendSync (2 );
912+ }
909913 }
910914
911915 videoPlaying = true ;
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ rvidHeaderInfo2 rvidHeader2;
88
99int rvidFrames = 0 ;
1010int rvidFps = 0 ;
11+ bool rvidReduceFpsBy01 = false ;
1112int rvidHRes = 0 ;
1213int rvidVRes = 0 ;
1314bool rvidInterlaced = false ;
@@ -52,6 +53,12 @@ void readRvidHeader(FILE* rvid) {
5253 fread (&rvidHeader2, 1 , sizeof (rvidHeader2), rvid);
5354 rvidFrames = rvidHeader2.frames ;
5455 rvidFps = rvidHeader2.fps ;
56+ if (rvidFps >= 0x80 ) {
57+ rvidFps -= 0x80 ;
58+ rvidReduceFpsBy01 = true ;
59+ } else {
60+ rvidReduceFpsBy01 = false ;
61+ }
5562 rvidVRes = rvidHeader2.vRes ;
5663 rvidInterlaced = rvidHeader2.interlaced ;
5764 rvidDualScreen = rvidHeader2.dualScreen ;
You can’t perform that action at this time.
0 commit comments