summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dxr3device.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/dxr3device.c b/dxr3device.c
index 984ad00..2531b6f 100644
--- a/dxr3device.c
+++ b/dxr3device.c
@@ -254,11 +254,9 @@ int cDxr3Device::PlayVideo(const uchar *Data, int Length)
vPts = pts;
}
- if (!scrSet && vPts != 0) {
- setScr(vPts);
- scrSet = true;
+ if (scrSet) {
+ playVideoFrame(&frame, vPts);
}
- playVideoFrame(&frame, vPts);
return Length;
}
@@ -281,6 +279,11 @@ int cDxr3Device::PlayAudio(const uchar *Data, int Length, uchar Id)
aPts = pts;
}
+ if (!scrSet && aPts != 0) {
+ setScr(aPts);
+ scrSet = true;
+ }
+
bool isAc3 = ((Id & 0xF0) == 0x80) || Id == 0xbd;
if (!isAc3) {