diff options
author | Peter Schlaile <peter@schlaile.de> | 2007-12-23 21:44:32 +0300 |
---|---|---|
committer | Peter Schlaile <peter@schlaile.de> | 2007-12-23 21:44:32 +0300 |
commit | 6cbc3daf34c0d59383dfe01360608ffc5dee2fdf (patch) | |
tree | db16bc69fefb428efdf3a03b641b2085a94137f6 /source/blender/imbuf | |
parent | 690d7a85bd7862ce01111335913bc22391049470 (diff) |
== FFMPEG ==
Fixes [#7475] no video as background
libswscale sets the alpha channel to 0 by default... grmbl.
Added a workaround. Big endian users please complain, if it doesn't work.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/intern/anim.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c index e99c35e45ce..8a67c1d035f 100644 --- a/source/blender/imbuf/intern/anim.c +++ b/source/blender/imbuf/intern/anim.c @@ -720,6 +720,7 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) { uint8_t* dst2[4]= { dst[0] + (anim->y - 1)*dstStride[0], 0, 0, 0 }; + int i; sws_scale(anim->img_convert_ctx, anim->pFrame->data, @@ -728,6 +729,11 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) { anim->pCodecCtx->height, dst2, dstStride2); + + /* workaround: sws_scale sets alpha = 0... */ + for (i = 0; i < ibuf->x * ibuf->y; i++) { + ibuf->rect[i] |= 0xff000000; + } av_free_packet(&packet); break; |