Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-09-14 12:55:35 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-09-14 12:56:25 +0300
commit8140b51aa45427bd951646775f6c3221271f35d2 (patch)
tree6da59804fd5c049c690de19c3ef66d0857cc036c /source/blender/imbuf
parentc57636f06001880022a4a091d20615ba527f2389 (diff)
Fix T52739: Crash loading corrupted video files
Affects both "normal" open as a video file and thumbnail generation.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/anim_movie.c5
1 files changed, 5 insertions, 0 deletions
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) {