== 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.
This commit is contained in:
Peter Schlaile
2007-12-23 18:44:32 +00:00
parent 690d7a85bd
commit 6cbc3daf34

View File

@@ -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;