diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/demuxers/demux_qt.c | 12 | ||||
-rw-r--r-- | src/xine-engine/input_cache.c | 6 |
3 files changed, 15 insertions, 4 deletions
@@ -21,6 +21,7 @@ xine-lib (1.1.90) (Unreleased) xine-lib (1.1.7) (unreleased) * Support libdca (new name for libdts) by shuffling around the dts.h file. + * Add support for MDHD version 1 atom in demux_qt. [bug #1679398] xine-lib (1.1.6) * Split the DirectFB plugin into X11 and non-X versions. diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index aca94f73d..cff4c48f9 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -916,9 +916,15 @@ static qt_error parse_trak_atom (qt_trak *trak, trak->edit_list_table[j].media_time); } - } else if (current_atom == MDHD_ATOM) - trak->timescale = BE_32(&trak_atom[i + 0x10]); - else if (current_atom == STSD_ATOM) { + } else if (current_atom == MDHD_ATOM) { + int version; + debug_atom_load ("demux_qt: mdhd atom\n"); + + version = trak_atom[i+4]; + if ( version > 1 ) continue; /* unsupported, undocumented */ + + trak->timescale = BE_32(&trak_atom[i + (version == 0 ? 0x10 : 0x18) ]); + } else if (current_atom == STSD_ATOM) { debug_atom_load ("demux_qt: stsd atom\n"); #if DEBUG_ATOM_LOAD diff --git a/src/xine-engine/input_cache.c b/src/xine-engine/input_cache.c index a566e1f84..75c4beb43 100644 --- a/src/xine-engine/input_cache.c +++ b/src/xine-engine/input_cache.c @@ -74,7 +74,11 @@ static off_t cache_plugin_read(input_plugin_t *this_gen, char *buf, off_t len) { if (len <= (this->buf_len - this->buf_pos)) { /* all bytes are in the buffer */ switch (len) { -#if !(defined(sparc) || defined(__sparc__) || defined __ia64__) +#if defined(__i386__) || defined(__x86_64__) + /* These are restricted to x86 and amd64. Some other architectures don't + * handle unaligned accesses in the same way, quite possibly requiring + * extra code over and above simple byte copies. + */ case 8: *((uint64_t *)buf) = *(uint64_t *)(&(this->buf[this->buf_pos])); break; |