diff options
author | Peter Schlaile <peter@schlaile.de> | 2008-08-03 20:11:57 +0400 |
---|---|---|
committer | Peter Schlaile <peter@schlaile.de> | 2008-08-03 20:11:57 +0400 |
commit | b647c5bba52867ac76543744bccbea8c77c902b7 (patch) | |
tree | fa8631ae067fa20eebe7d3f7e0a85dd8638feb4d /source/blender/imbuf/intern/anim.c | |
parent | ac7aef6b3dd95aeadec78d83be8b9ac38e0a45e1 (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/intern/anim.c')
-rw-r--r-- | source/blender/imbuf/intern/anim.c | 15 |
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); } |