Annotation of /trunk/mplayer/patches/mplayer-1.0_rc2-demux_mov_fix_20080129.patch
Parent Directory | Revision Log
Revision 463 -
(hide annotations)
(download)
Tue Feb 5 16:48:20 2008 UTC (16 years, 4 months ago) by niro
File size: 1345 byte(s)
Tue Feb 5 16:48:20 2008 UTC (16 years, 4 months ago) by niro
File size: 1345 byte(s)
-fixed patch
1 | niro | 463 | Index: demux_mov.c |
2 | =================================================================== | ||
3 | --- demux_mov.c (revision 24724) | ||
4 | +++ demux_mov.c (working copy) | ||
5 | @@ -173,11 +173,12 @@ | ||
6 | niro | 462 | i=trak->chunkmap_size; |
7 | while(i>0){ | ||
8 | --i; | ||
9 | - for(j=trak->chunkmap[i].first;j<last;j++){ | ||
10 | + j=FFMAX(trak->chunkmap[i].first, 0); | ||
11 | + for(;j<last;j++){ | ||
12 | trak->chunks[j].desc=trak->chunkmap[i].sdid; | ||
13 | trak->chunks[j].size=trak->chunkmap[i].spc; | ||
14 | } | ||
15 | - last=trak->chunkmap[i].first; | ||
16 | + last=FFMIN(trak->chunkmap[i].first, trak->chunks_size); | ||
17 | } | ||
18 | |||
19 | #if 0 | ||
20 | niro | 463 | @@ -235,6 +236,8 @@ |
21 | niro | 462 | s=0; |
22 | for(j=0;j<trak->durmap_size;j++){ | ||
23 | for(i=0;i<trak->durmap[j].num;i++){ | ||
24 | + if (s >= trak->samples_size) | ||
25 | + break; | ||
26 | trak->samples[s].pts=pts; | ||
27 | ++s; | ||
28 | pts+=trak->durmap[j].dur; | ||
29 | niro | 463 | @@ -246,6 +249,8 @@ |
30 | niro | 462 | for(j=0;j<trak->chunks_size;j++){ |
31 | off_t pos=trak->chunks[j].pos; | ||
32 | for(i=0;i<trak->chunks[j].size;i++){ | ||
33 | + if (s >= trak->samples_size) | ||
34 | + break; | ||
35 | trak->samples[s].pos=pos; | ||
36 | mp_msg(MSGT_DEMUX, MSGL_DBG3, "Sample %5d: pts=%8d off=0x%08X size=%d\n",s, | ||
37 | trak->samples[s].pts, | ||
38 | niro | 463 | @@ -1568,8 +1573,7 @@ |
39 | if( udta_len>udta_size) | ||
40 | udta_len=udta_size; | ||
41 | { | ||
42 | - char dump[udta_len-4]; | ||
43 | - stream_read(demuxer->stream, (char *)&dump, udta_len-4-4); | ||
44 | + stream_skip(demuxer->stream, udta_len-4-4); | ||
45 | udta_size -= udta_len; | ||
46 | } | ||
47 | } |