From 8a926cfe43464c804fbf4fe9e4dba479fc2e0cc0 Mon Sep 17 00:00:00 2001 From: Claudio Ciccani Date: Thu, 31 May 2007 16:57:28 +0100 Subject: Patch: fix parsing qt/mov embedded refernces The attached patch fixes a problem with embedded references in recent versions of quicktime's movie formats. Apparently there is an additional atom (RMRA) before the RMDA atom: it works like a container for all subsequent atoms, so it can be safely skipped. You can test yourself what I'm saying by watching some trailers at apple.com (http://www.apple.com/trailers). -- Regards, Claudio Ciccani klan@users.sf.net http://directfb.org http://sf.net/projects/php-directfb --- src/demuxers/demux_qt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 0624dc673..23a45c792 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -121,6 +121,7 @@ typedef unsigned int qt_atom; #define WRT_ATOM QT_ATOM(0xA9, 'w', 'r', 't') #define DAY_ATOM QT_ATOM(0xA9, 'd', 'a', 'y') +#define RMRA_ATOM QT_ATOM('r', 'm', 'r', 'a') #define RMDA_ATOM QT_ATOM('r', 'm', 'd', 'a') #define RDRF_ATOM QT_ATOM('r', 'd', 'r', 'f') #define RMDR_ATOM QT_ATOM('r', 'm', 'd', 'r') @@ -1987,7 +1988,8 @@ static void parse_moov_atom(qt_info *info, unsigned char *moov_atom, strncpy(info->comment, &moov_atom[i + 8], string_size - 1); info->comment[string_size - 1] = 0; - } else if (current_atom == RMDA_ATOM) { + } else if (current_atom == RMDA_ATOM || + current_atom == RMRA_ATOM) { /* create a new reference structure */ info->reference_count++; -- cgit v1.2.3