Fix end-of-stream detection for videos

Fixes hang when a video file contains frames past the end of the video stream
This commit is contained in:
Bart van Strien
2016-03-29 22:43:20 +02:00
parent 3d25416e14
commit 8dd7cc16ab
+2 -2
View File
@@ -150,13 +150,13 @@ bool VideoStream::readPacket(bool mustSucceed)
}
while (ogg_stream_packetout(&stream, &packet) != 1)
{
do
{
// We need to read another page, but there is none, we're at the end
if (ogg_page_eos(&page) && !mustSucceed)
return eos = true;
do
{
readPage();
} while (ogg_page_serialno(&page) != videoSerial);