fixed imlib2.c pixel format (imlib2 seems to use CPU endianness in RGBA32 as libavcodec)

Originally committed as revision 1471 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Fabrice Bellard 2003-01-19 15:40:06 +00:00
parent 6b02692791
commit 0e5f8ab165
1 changed files with 5 additions and 5 deletions

View File

@ -210,9 +210,9 @@ 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_BGRA32) { if (pix_fmt != PIX_FMT_RGBA32) {
avpicture_fill(&picture1, (UINT8 *) data, PIX_FMT_BGRA32, width, height); avpicture_fill(&picture1, (UINT8 *) data, PIX_FMT_RGBA32, width, height);
if (img_convert(&picture1, PIX_FMT_BGRA32, if (img_convert(&picture1, PIX_FMT_RGBA32,
picture, pix_fmt, width, height) < 0) { picture, pix_fmt, width, height) < 0) {
goto done; goto done;
} }
@ -264,9 +264,9 @@ void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width,
} }
} }
if (pix_fmt != PIX_FMT_BGRA32) { if (pix_fmt != PIX_FMT_RGBA32) {
if (img_convert(picture, pix_fmt, if (img_convert(picture, pix_fmt,
&picture1, PIX_FMT_BGRA32, width, height) < 0) { &picture1, PIX_FMT_RGBA32, width, height) < 0) {
} }
} }