From b6ee0fa3d62b1343e075b13e69ebe72c482ec145 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 13 Jul 2007 15:52:02 +0000 Subject: [PATCH] gst/ffmpegcolorspace/gstffmpegcodecmap.c: Fix the r_mask test for RGBA32 on little-endian. Original commit message from CVS: * gst/ffmpegcolorspace/gstffmpegcodecmap.c: (gst_ffmpeg_caps_to_pixfmt): Fix the r_mask test for RGBA32 on little-endian. Fix a stupid typo that would have obviously broken compilation on big-endian, if anyone was testing. --- ChangeLog | 8 ++++++++ gst/ffmpegcolorspace/gstffmpegcodecmap.c | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9e3cb293e4..5663b4a010 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-07-13 Jan Schmidt + + * gst/ffmpegcolorspace/gstffmpegcodecmap.c: + (gst_ffmpeg_caps_to_pixfmt): + Fix the r_mask test for RGBA32 on little-endian. + Fix a stupid typo that would have obviously broken + compilation on big-endian, if anyone was testing. + 2007-07-12 Wim Taymans * gst/videotestsrc/videotestsrc.c: (paint_hline_AYUV), diff --git a/gst/ffmpegcolorspace/gstffmpegcodecmap.c b/gst/ffmpegcolorspace/gstffmpegcodecmap.c index bb46375c7a..96e1a640d6 100644 --- a/gst/ffmpegcolorspace/gstffmpegcodecmap.c +++ b/gst/ffmpegcolorspace/gstffmpegcodecmap.c @@ -637,7 +637,7 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps, #else if (rmask == 0x00ff0000) context->pix_fmt = PIX_FMT_BGRA32; - else if (rmask == 0x00ff0000) + else if (rmask == 0x0000ff00) context->pix_fmt = PIX_FMT_RGBA32; else if (rmask == 0x000000ff) context->pix_fmt = PIX_FMT_ARGB32; @@ -648,12 +648,12 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps, #if (G_BYTE_ORDER == G_BIG_ENDIAN) if (rmask == 0x00ff0000) context->pix_fmt = PIX_FMT_RGB32; - elseif (rmask == 0x0000ff00) - context->pix_fmt = PIX_FMT_BGR32; - elseif (rmask == 0xff000000) - context->pix_fmt = PIX_FMT_xRGB32; + else if (rmask == 0x0000ff00) + context->pix_fmt = PIX_FMT_BGR32; + else if (rmask == 0xff000000) + context->pix_fmt = PIX_FMT_xRGB32; else // if (rmask == 0x000000ff) - context->pix_fmt = PIX_FMT_BGRx32; + context->pix_fmt = PIX_FMT_BGRx32; #else if (rmask == 0x0000ff00) context->pix_fmt = PIX_FMT_RGB32;