diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-10-29 16:17:51 -0700 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-11-05 06:59:27 -0700 |
commit | d31fb1a9e77f37ee1bbc0faabc655390eb91b579 (patch) | |
tree | 457233cadbe89b0094c42b5ccde4da0cb498e6b9 /libavformat/matroskadec.c | |
parent | 23a8b4ddfca9f7da5da491f33a62269d96927674 (diff) | |
download | ffmpeg-d31fb1a9e77f37ee1bbc0faabc655390eb91b579.tar.gz |
matroskadec: empty blocks are in fact valid.
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 3f48a72c8e..a40aa1c469 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -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; |