From f17b1bf4f09c14d18a7bd2c5b0eeb2ac2f4490f7 Mon Sep 17 00:00:00 2001
From: Matthew Hoops
Date: Mon, 27 Feb 2012 18:31:20 -0500
Subject: COMMON: Fix opening QuickTime files from MacBinary files

---
 common/quicktime.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

(limited to 'common')

diff --git a/common/quicktime.cpp b/common/quicktime.cpp
index dbec7f7b90..248d8b2b3a 100644
--- a/common/quicktime.cpp
+++ b/common/quicktime.cpp
@@ -66,7 +66,7 @@ bool QuickTimeParser::parseFile(const String &filename) {
 	_foundMOOV = false;
 	_disposeFileHandle = DisposeAfterUse::YES;
 
-	Atom atom = { 0, 0, 0xffffffff };
+	Atom atom = { 0, 0, 0 };
 
 	if (_resFork->hasResFork()) {
 		// Search for a 'moov' resource
@@ -80,14 +80,12 @@ bool QuickTimeParser::parseFile(const String &filename) {
 			if (readDefault(atom) < 0 || !_foundMOOV)
 				return false;
 		}
-		delete _fd;
 
-		atom.type = 0;
-		atom.offset = 0;
-		atom.size = 0xffffffff;
+		delete _fd;
 	}
 
 	_fd = _resFork->getDataFork();
+	atom.size = _fd->size();
 
 	if (readDefault(atom) < 0 || !_foundMOOV)
 		return false;
-- 
cgit v1.2.3