mkv: mark corrupted packets and return them

Do return error if memory allocation or I/O fails.
This commit is contained in:
Luca Barbato 2012-04-29 17:55:51 -07:00
parent 721af294d9
commit 0ca4642ec5
1 changed files with 5 additions and 0 deletions

View File

@ -2069,6 +2069,11 @@ static int matroska_read_packet(AVFormatContext *s, AVPacket *pkt)
ret = matroska_parse_cluster(matroska);
}
if (ret == AVERROR_INVALIDDATA) {
pkt->flags |= AV_PKT_FLAG_CORRUPT;
return 0;
}
return ret;
}