Browse files

Fix theora header checking

  • Loading branch information...
1 parent 35c5fec commit 1dbe22cd6133b4b6f7f554f2a366bf52535c0214 @doublec committed Jun 26, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 plogg.cpp
View
4 plogg.cpp
@@ -193,7 +193,7 @@ void OggDecoder::handle_theora_header(OggStream* stream, ogg_packet* packet) {
&stream->mTheora.mComment,
&stream->mTheora.mSetup,
packet);
- if (ret == OC_NOTFORMAT)
+ if (ret == TH_ENOTFORMAT)
return; // Not a theora header
if (ret > 0) {
@@ -202,7 +202,9 @@ void OggDecoder::handle_theora_header(OggStream* stream, ogg_packet* packet) {
return;
}
+ // Any other return value is treated as a fatal error
assert(ret == 0);
+
// This is not a header packet. It is the first
// video data packet.
stream->mTheora.mCtx =

0 comments on commit 1dbe22c

Please sign in to comment.