Commit bb4a8772 authored by Michael Niedermayer's avatar Michael Niedermayer

imlib2 vhook rgba fix by ("Todd.Kirby" <doubleshot at pacbell dot net>)

Originally committed as revision 3498 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent b43b426a
...@@ -213,14 +213,14 @@ void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, ...@@ -213,14 +213,14 @@ void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width,
imlib_context_set_image(image); imlib_context_set_image(image);
data = imlib_image_get_data(); data = imlib_image_get_data();
if (pix_fmt != PIX_FMT_RGBA32) {
avpicture_fill(&picture1, (uint8_t *) data, PIX_FMT_RGBA32, width, height); avpicture_fill(&picture1, (uint8_t *) data, PIX_FMT_RGBA32, width, height);
if (pix_fmt != PIX_FMT_RGBA32) {
if (img_convert(&picture1, PIX_FMT_RGBA32, if (img_convert(&picture1, PIX_FMT_RGBA32,
picture, pix_fmt, width, height) < 0) { picture, pix_fmt, width, height) < 0) {
goto done; goto done;
} }
} else { } else {
av_abort(); img_copy(&picture1, picture, PIX_FMT_RGBA32, width, height);
} }
imlib_image_set_has_alpha(0); imlib_image_set_has_alpha(0);
...@@ -271,6 +271,8 @@ void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, ...@@ -271,6 +271,8 @@ void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width,
if (img_convert(picture, pix_fmt, if (img_convert(picture, pix_fmt,
&picture1, PIX_FMT_RGBA32, width, height) < 0) { &picture1, PIX_FMT_RGBA32, width, height) < 0) {
} }
} else {
img_copy(picture, &picture1, PIX_FMT_RGBA32, width, height);
} }
done: done:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment