Skip xma read when at the end of the stream.

This commit is contained in:
Ben Vanik 2015-11-16 19:40:43 -08:00
parent 2602d54775
commit a556316ba2
1 changed files with 1 additions and 1 deletions

View File

@ -228,7 +228,7 @@ bool XmaContext::ValidFrameOffset(uint8_t* block, size_t size_bytes,
size_t relative_offset_bits = frame_offset_bits % (kBytesPerPacket * 8);
uint32_t first_frame_offset = xma::GetPacketFrameOffset(packet);
if (first_frame_offset == -1) {
if (first_frame_offset == -1 || first_frame_offset > kBytesPerPacket * 8) {
// Packet only contains a partial frame, so no frames can start here.
return false;
}