gst/ffmpegcolorspace/gstffmpegcodecmap.c: alpha_mask can be RGBA/ABGR. Fixes #164265.

Original commit message from CVS:
Reviewed by:  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
* gst/ffmpegcolorspace/gstffmpegcodecmap.c:
(gst_ffmpeg_caps_to_pixfmt):
alpha_mask can be RGBA/ABGR. Fixes #164265.
This commit is contained in:
Ronald S. Bultje 2005-01-17 14:08:19 +00:00
parent 1211b6983e
commit d6f07e9e7c
2 changed files with 16 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2005-01-17 Gergely Nagy <algernon@bonehunter.rulez.org>
Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/ffmpegcolorspace/gstffmpegcodecmap.c:
(gst_ffmpeg_caps_to_pixfmt):
alpha_mask can be RGBA/ABGR. Fixes #164265.
2005-01-17 Francis Labonte <francis_labonte@hotmail.com>
Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>

View file

@ -490,7 +490,14 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
switch (bpp) {
case 32:
if (gst_structure_get_int (structure, "alpha_mask", &amask)) {
context->pix_fmt = PIX_FMT_RGBA32;
#if (G_BYTE_ORDER == G_BIG_ENDIAN)
if (rmask == 0x00ff0000)
#else
if (rmask == 0x0000ff00)
#endif
context->pix_fmt = PIX_FMT_BGRA32;
else
context->pix_fmt = PIX_FMT_RGBA32;
} else {
#if (G_BYTE_ORDER == G_BIG_ENDIAN)
if (rmask == 0x00ff0000)