mirror of https://github.com/mpv-player/mpv
Limit the number of entires to the amount that does fit into the chunk.
the function need rewrite as it assumes quite many things that are not guaranteed by the specifications. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18050 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e34e980420
commit
64159b23f8
|
@ -225,6 +225,11 @@ while(1){
|
||||||
|
|
||||||
print_avisuperindex_chunk(s,MSGL_V);
|
print_avisuperindex_chunk(s,MSGL_V);
|
||||||
|
|
||||||
|
if( ((chunksize/4)/s->wLongsPerEntry) < s->nEntriesInUse){
|
||||||
|
mp_msg (MSGT_HEADER, MSGL_WARN, "Broken super index chunk\n");
|
||||||
|
s->nEntriesInUse = (chunksize/4)/s->wLongsPerEntry;
|
||||||
|
}
|
||||||
|
|
||||||
// Check and fix this useless crap
|
// Check and fix this useless crap
|
||||||
if(s->wLongsPerEntry != sizeof (avisuperindex_entry)/4) {
|
if(s->wLongsPerEntry != sizeof (avisuperindex_entry)/4) {
|
||||||
mp_msg (MSGT_HEADER, MSGL_WARN, "Broken super index chunk size: %u\n",s->wLongsPerEntry);
|
mp_msg (MSGT_HEADER, MSGL_WARN, "Broken super index chunk size: %u\n",s->wLongsPerEntry);
|
||||||
|
|
Loading…
Reference in New Issue