diff options
author | Ewald Snel <esnel@users.sourceforge.net> | 2002-12-21 21:57:43 +0000 |
---|---|---|
committer | Ewald Snel <esnel@users.sourceforge.net> | 2002-12-21 21:57:43 +0000 |
commit | 1b71075127f7fdfad0c16cc8535cd2c2b4e01c3b (patch) | |
tree | 4a2e775ba96287bdbc01fdc6fd5eca6af023351c /src | |
parent | daedbc121e188d900fdcb23b16944c559b25e811 (diff) | |
download | xine-lib-1b71075127f7fdfad0c16cc8535cd2c2b4e01c3b.tar.gz xine-lib-1b71075127f7fdfad0c16cc8535cd2c2b4e01c3b.tar.bz2 |
Fix another (small) memory leak
CVS patchset: 3622
CVS date: 2002/12/21 21:57:43
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_qt.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 55507ef1d..ed1c3dc8d 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -30,7 +30,7 @@ * build_frame_table * free_qt_info * - * $Id: demux_qt.c,v 1.133 2002/12/21 13:45:56 esnel Exp $ + * $Id: demux_qt.c,v 1.134 2002/12/21 21:57:43 esnel Exp $ * */ @@ -1589,8 +1589,9 @@ static void parse_moov_atom(qt_info *info, unsigned char *moov_atom) { } /* stsd atom */ - info->video_stsd = sample_tables[i].stsd; + info->video_stsd = realloc (info->video_stsd, sample_tables[i].stsd_size); info->video_stsd_size = sample_tables[i].stsd_size; + memcpy(info->video_stsd, sample_tables[i].stsd, info->video_stsd_size); } else if (sample_tables[i].type == MEDIA_AUDIO) { @@ -1614,8 +1615,9 @@ static void parse_moov_atom(qt_info *info, unsigned char *moov_atom) { sizeof(xine_waveformatex)); /* stsd atom */ - info->audio_stsd = sample_tables[i].stsd; + info->audio_stsd = realloc (info->audio_stsd, sample_tables[i].stsd_size); info->audio_stsd_size = sample_tables[i].stsd_size; + memcpy(info->audio_stsd, sample_tables[i].stsd, info->audio_stsd_size); } } debug_frame_table(" qt: finished building frame tables, merging into one...\n"); @@ -1689,6 +1691,7 @@ static void parse_moov_atom(qt_info *info, unsigned char *moov_atom) { free(sample_tables[i].sample_to_chunk_table); free(sample_tables[i].sync_sample_table); free(sample_tables[i].frames); + free(sample_tables[i].stsd); } free(sample_tables); free(sample_table_indices); |