[Bf-blender-cvs] [8140b51aa45] master: Fix T52739: Crash loading corrupted video files
Sergey Sharybin
noreply at git.blender.org
Thu Sep 14 11:56:28 CEST 2017
Commit: 8140b51aa45427bd951646775f6c3221271f35d2
Author: Sergey Sharybin
Date: Thu Sep 14 14:55:35 2017 +0500
Branches: master
https://developer.blender.org/rB8140b51aa45427bd951646775f6c3221271f35d2
Fix T52739: Crash loading corrupted video files
Affects both "normal" open as a video file and thumbnail generation.
===================================================================
M source/blender/imbuf/intern/anim_movie.c
===================================================================
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index 9806ff006d7..5bb91efe186 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -513,6 +513,11 @@ static int startffmpeg(struct anim *anim)
avformat_close_input(&pFormatCtx);
return -1;
}
+ if (pCodecCtx->pix_fmt == AV_PIX_FMT_NONE) {
+ avcodec_close(anim->pCodecCtx);
+ avformat_close_input(&pFormatCtx);
+ return -1;
+ }
frame_rate = av_get_r_frame_rate_compat(pFormatCtx->streams[videoStream]);
if (pFormatCtx->streams[videoStream]->nb_frames != 0) {
More information about the Bf-blender-cvs
mailing list