Do return error if memory allocation or I/O fails.
Unified · Split
| @@ -2069,6 +2069,11 @@ static int matroska_read_packet(AVFormatContext *s, AVPacket *pkt) · 2068 unmodified lines | ||
| 2069 | 2069 | ret = matroska_parse_cluster(matroska); |
| 2070 | 2070 | } |
| 2071 | 2071 | |
| 2072 | + if (ret == AVERROR_INVALIDDATA) { | |
| 2073 | + pkt->flags |= AV_PKT_FLAG_CORRUPT; | |
| 2074 | + return 0; | |
| 2075 | + } | |
| 2076 | + | |
| 2072 | 2077 | return ret; |
| 2073 | 2078 | } |
| 2074 | 2079 | |