From 89ec9766a135e5842c45d7f3dd3e6b6fe960df78 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Tue, 4 Aug 2015 19:17:04 +0200 Subject: VIDEO: After figuring out sample rate, rewind the AC-3 stream --- video/mpegps_decoder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'video') 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 { -- cgit v1.2.3