[matroska] r904 - trunk/DvdMenuXtractor

[email protected]
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Author: robux4
Date: 2004-10-22 23:49:54 +0400 (Fri, 22 Oct 2004)
New Revision: 904

Modified:
   trunk/DvdMenuXtractor/A52Decoder.cpp
   trunk/DvdMenuXtractor/MPEG2Decoder.cpp
Log:
allow full extraction, even with the currently incomplete code

Modified: trunk/DvdMenuXtractor/A52Decoder.cpp
===================================================================
--- trunk/DvdMenuXtractor/A52Decoder.cpp	2004-10-20 12:34:45 UTC (rev 903)
+++ trunk/DvdMenuXtractor/A52Decoder.cpp	2004-10-22 19:49:54 UTC (rev 904)
@@ -1,3 +1,5 @@
+#include <cassert>
+
 #include "A52Decoder.h"
 
 #pragma comment(lib, "liba52.lib")
@@ -227,8 +229,12 @@
 void A52Decoder::ProcessFile(const char* inputFileName)
 {
 	FILE* inputFile = fopen(inputFileName,"rb");
-	ProcessFile(inputFile);
-	fclose(inputFile);
+	assert(inputFile != NULL); // _TODO_ we should not come here
+	if (inputFile)
+	{
+		ProcessFile(inputFile);
+		fclose(inputFile);
+	}
 }
 
 // ----------------------------------------------------------------------------

Modified: trunk/DvdMenuXtractor/MPEG2Decoder.cpp
===================================================================
--- trunk/DvdMenuXtractor/MPEG2Decoder.cpp	2004-10-20 12:34:45 UTC (rev 903)
+++ trunk/DvdMenuXtractor/MPEG2Decoder.cpp	2004-10-22 19:49:54 UTC (rev 904)
@@ -1,3 +1,5 @@
+#include <cassert>
+
 #include "MPEG2Decoder.h"
 #if defined(WIN32)
 #include <windows.h>
@@ -179,6 +181,7 @@
 void MPEG2Decoder::ProcessFile(const char* inputFileName)
 {
 	FILE* inputFile = fopen(inputFileName,"rb");
+	assert(inputFile != NULL); // _TODO_ we should not come here
 	if (inputFile)
 	{
 		ProcessFile(inputFile);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.