aboutsummaryrefslogtreecommitdiff
path: root/video
diff options
context:
space:
mode:
authorTorbjörn Andersson2015-08-04 19:17:04 +0200
committerThierry Crozat2018-11-04 22:33:22 +0100
commit89ec9766a135e5842c45d7f3dd3e6b6fe960df78 (patch)
tree1b795c6121815061e7036222cc88abb1f4e41d80 /video
parentad41dfb7ff25daf9e974c6c9dbdfb099307af4f7 (diff)
downloadscummvm-rg350-89ec9766a135e5842c45d7f3dd3e6b6fe960df78.tar.gz
scummvm-rg350-89ec9766a135e5842c45d7f3dd3e6b6fe960df78.tar.bz2
scummvm-rg350-89ec9766a135e5842c45d7f3dd3e6b6fe960df78.zip
VIDEO: After figuring out sample rate, rewind the AC-3 stream
Diffstat (limited to 'video')
-rw-r--r--video/mpegps_decoder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/video/mpegps_decoder.cpp b/video/mpegps_decoder.cpp
index e34053da73..178a2a420a 100644
--- a/video/mpegps_decoder.cpp
+++ b/video/mpegps_decoder.cpp
@@ -593,12 +593,12 @@ void MPEGPSDecoder::AC3AudioTrack::initStream(Common::SeekableReadStream *packet
packet->seek(i, SEEK_SET);
packet->read(buf, sizeof(buf));
- int packetLength = a52_syncinfo(buf, &flags, &_sampleRate, &bitRate);
-
- if (packetLength > 0) {
+ if (a52_syncinfo(buf, &flags, &_sampleRate, &bitRate) > 0) {
break;
}
}
+
+ packet->seek(0, SEEK_SET);
}
enum {