1
0
Fork 0

MatroskaParser: more gracefully fail on files with more then 64 tracks

Instead of playback failing, excess tracks are skipped
This commit is contained in:
Hendrik Leppkes 2020-12-03 13:58:33 +01:00
parent 60903b6c6f
commit 1aac8d869b
Signed by: hendrik
GPG Key ID: 846079A4B0A7C1B5
1 changed files with 5 additions and 2 deletions

View File

@ -1424,8 +1424,11 @@ static void parseTrackEntry(MatroskaFile *mf,ulonglong toplen) {
size_t cplen = 0, cslen = 0, cpadd = 0;
unsigned CompScope, num_comp = 0;
if (mf->nTracks >= MAX_TRACKS)
errorjmp(mf,"Too many tracks.");
if (mf->nTracks >= MAX_TRACKS) {
//errorjmp(mf,"Too many tracks.");
skipbytes(mf, toplen);
return;
}
// clear track info
memset(&t,0,sizeof(t));