VIDEO: After figuring out sample rate, rewind the AC-3 stream

This commit is contained in:
Torbjörn Andersson 2015-08-04 19:17:04 +02:00 committed by Thierry Crozat
parent ad41dfb7ff
commit 89ec9766a1

View File

@ -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 {