diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-24 19:34:57 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-24 19:34:57 +0400 |
commit | ae38adbf55c83f3c60eca533264f390fa64250b8 (patch) | |
tree | e33a6d036f8e6de9bf235fa5b89897576a178c26 /source | |
parent | e04f32a15354ce8e9912882c32cd05f63388de1b (diff) |
Blender should now compile fine with older FFmpeg libraries used.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/writeffmpeg.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 2291ea5a249..d47ba1274b1 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -512,12 +512,16 @@ static AVStream* alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex } if (codec_id == CODEC_ID_FFV1) { +#ifdef FFMPEG_FFV1_ALPHA_SUPPORTED if (rd->im_format.planes == R_IMF_PLANES_RGBA) { c->pix_fmt = PIX_FMT_RGB32; } else { c->pix_fmt = PIX_FMT_BGR0; } +#else + c->pix_fmt = PIX_FMT_RGB32; +#endif } if (codec_id == CODEC_ID_QTRLE ) { @@ -1435,7 +1439,15 @@ int ffmpeg_alpha_channel_supported(RenderData *rd) { int codec = rd->ffcodecdata.codec; - return ELEM(codec, CODEC_ID_QTRLE, CODEC_ID_FFV1); + if (codec == CODEC_ID_QTRLE) + return TRUE; + +#ifdef FFMPEG_FFV1_ALPHA_SUPPORTED + if (codec == CODEC_ID_FFV1) + return TRUE; +#endif + + return FALSE; } #endif |