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:
authorPeter Schlaile <peter@schlaile.de>2008-08-03 20:11:57 +0400
committerPeter Schlaile <peter@schlaile.de>2008-08-03 20:11:57 +0400
commitb647c5bba52867ac76543744bccbea8c77c902b7 (patch)
treefa8631ae067fa20eebe7d3f7e0a85dd8638feb4d /source/blender/imbuf
parentac7aef6b3dd95aeadec78d83be8b9ac38e0a45e1 (diff)
== FFMPEG ==
This fixes: [#16655] Blender crashes when Fraps videos are added to the sequencer (sorry, color conversion is not supported by swscaler for some reason, so currently, only the crash is fixed)
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/anim.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c
index 720f5b0f7c8..c0e84b73e47 100644
--- a/source/blender/imbuf/intern/anim.c
+++ b/source/blender/imbuf/intern/anim.c
@@ -612,6 +612,7 @@ static int startffmpeg(struct anim * anim) {
av_free(anim->pFrameRGB);
av_free(anim->pFrameDeinterlaced);
av_free(anim->pFrame);
+ anim->pCodecCtx = NULL;
return -1;
}
@@ -639,7 +640,19 @@ static int startffmpeg(struct anim * anim) {
PIX_FMT_BGR32,
SWS_FAST_BILINEAR | SWS_PRINT_INFO,
NULL, NULL, NULL);
-
+
+ if (!anim->img_convert_ctx) {
+ fprintf (stderr,
+ "Can't transform color space??? Bailing out...\n");
+ avcodec_close(anim->pCodecCtx);
+ av_close_input_file(anim->pFormatCtx);
+ av_free(anim->pFrameRGB);
+ av_free(anim->pFrameDeinterlaced);
+ av_free(anim->pFrame);
+ anim->pCodecCtx = NULL;
+ return -1;
+ }
+
return (0);
}