From 8f6b919d99687416deaedb2df6b8b5f49645a291 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Thu, 21 May 2015 00:43:38 +0200 Subject: [PATCH] lavf/mkv: Only skip prores header if the packet is large enough. Fixes a possible endless loop. --- libavformat/matroskaenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 7cbba0b002..c4c58f4d09 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1575,7 +1575,7 @@ static void mkv_write_block(AVFormatContext *s, AVIOContext *pb, } else data = pkt->data; - if (codec->codec_id == AV_CODEC_ID_PRORES) { + if (codec->codec_id == AV_CODEC_ID_PRORES && size >= 8) { /* Matroska specification requires to remove the first QuickTime atom */ size -= 8;