Blender should now compile fine with older FFmpeg libraries used.
This commit is contained in:
parent
e04f32a153
commit
ae38adbf55
@ -72,6 +72,10 @@
|
|||||||
#define FFMPEG_SWSCALE_COLOR_SPACE_SUPPORT
|
#define FFMPEG_SWSCALE_COLOR_SPACE_SUPPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ((LIBAVUTIL_VERSION_MAJOR > 51) || (LIBAVUTIL_VERSION_MAJOR == 51) && (LIBAVUTIL_VERSION_MINOR >= 32))
|
||||||
|
#define FFMPEG_FFV1_ALPHA_SUPPORTED
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef FFMPEG_HAVE_AVIO
|
#ifndef FFMPEG_HAVE_AVIO
|
||||||
#define AVIO_FLAG_WRITE URL_WRONLY
|
#define AVIO_FLAG_WRITE URL_WRONLY
|
||||||
#define avio_open url_fopen
|
#define avio_open url_fopen
|
||||||
|
@ -512,12 +512,16 @@ static AVStream* alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (codec_id == CODEC_ID_FFV1) {
|
if (codec_id == CODEC_ID_FFV1) {
|
||||||
|
#ifdef FFMPEG_FFV1_ALPHA_SUPPORTED
|
||||||
if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
|
if (rd->im_format.planes == R_IMF_PLANES_RGBA) {
|
||||||
c->pix_fmt = PIX_FMT_RGB32;
|
c->pix_fmt = PIX_FMT_RGB32;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
c->pix_fmt = PIX_FMT_BGR0;
|
c->pix_fmt = PIX_FMT_BGR0;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
c->pix_fmt = PIX_FMT_RGB32;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (codec_id == CODEC_ID_QTRLE ) {
|
if (codec_id == CODEC_ID_QTRLE ) {
|
||||||
@ -1435,7 +1439,15 @@ int ffmpeg_alpha_channel_supported(RenderData *rd)
|
|||||||
{
|
{
|
||||||
int codec = rd->ffcodecdata.codec;
|
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
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user