ffmpeg | branch: master | Carl Eugen Hoyos <ceho...@ag.or.at> | Thu May 21 
00:43:38 2015 +0200| [8f6b919d99687416deaedb2df6b8b5f49645a291] | committer: 
Carl Eugen Hoyos

lavf/mkv: Only skip prores header if the packet is large enough.

Fixes a possible endless loop.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8f6b919d99687416deaedb2df6b8b5f49645a291
---

 libavformat/matroskaenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 7cbba0b..c4c58f4 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;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to