diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-18 20:20:04 +0100 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-18 20:20:04 +0100 |
commit | 38b08ea4a1a3130eb05139b7121ece98a4c3d232 (patch) | |
tree | e70c45ae1383e86c5ff026c174dc3175ff8baec7 /src | |
parent | 485a597194d373aa233017be47c8cfa1b92748d7 (diff) | |
download | xine-lib-38b08ea4a1a3130eb05139b7121ece98a4c3d232.tar.gz xine-lib-38b08ea4a1a3130eb05139b7121ece98a4c3d232.tar.bz2 |
Alloc preview only when needed; use zeroed allocation rather than memset.
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_qt.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index f9b14f9e8..e2db5855a 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -686,13 +686,12 @@ static int is_qt_file(input_plugin_t *qt_file) { int64_t moov_atom_size = -1; int i; unsigned char atom_preamble[ATOM_PREAMBLE_SIZE]; - unsigned char preview[MAX_PREVIEW_SIZE]; int len; /* if the input is non-seekable, be much more stringent about qualifying * a QT file: In this case, the moov must be the first atom in the file */ if ((qt_file->get_capabilities(qt_file) & INPUT_CAP_SEEKABLE) == 0) { - memset (&preview, 0, MAX_PREVIEW_SIZE); + unsigned char preview[MAX_PREVIEW_SIZE] = { 0, }; len = qt_file->get_optional_data(qt_file, preview, INPUT_OPTIONAL_DATA_PREVIEW); if (_X_BE_32(&preview[4]) == MOOV_ATOM) return 1; |