1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-16 11:55:42 +00:00

And a 1000l for r27263, swapped a condition, thus setting size to

0 when malloc succeeded instead of when it failed.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27304 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2008-07-16 17:48:34 +00:00
parent 2f5b26277f
commit b422b105d7

View File

@ -1751,7 +1751,7 @@ static int lschunks_intrak(demuxer_t* demuxer, int level, unsigned int id,
"MOV: %*sSample duration table! (%d blocks)\n", level, "",
len);
trak->durmap = calloc(len, sizeof(mov_durmap_t));
trak->durmap_size = trak->durmap ? 0 : len;
trak->durmap_size = trak->durmap ? len : 0;
for (i = 0; i < trak->durmap_size; i++) {
trak->durmap[i].num = stream_read_dword(demuxer->stream);
trak->durmap[i].dur = stream_read_dword(demuxer->stream);