matroskadec: empty blocks are in fact valid.

This commit is contained in:
Ronald S. Bultje 2011-10-29 16:17:51 -07:00
parent 23a8b4ddfc
commit d31fb1a9e7
1 changed files with 3 additions and 2 deletions

View File

@ -1679,11 +1679,12 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
size -= n;
track = matroska_find_track_by_num(matroska, num);
if (size <= 3 || !track || !track->stream) {
if (!track || !track->stream) {
av_log(matroska->ctx, AV_LOG_INFO,
"Invalid stream %"PRIu64" or size %u\n", num, size);
return AVERROR_INVALIDDATA;
}
} else if (size <= 3)
return 0;
st = track->stream;
if (st->discard >= AVDISCARD_ALL)
return res;