mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 10:42:22 +00:00
gst/ffmpegcolorspace/gstffmpegcodecmap.c: Fix for depth = 15. Fixes #161675.
Original commit message from CVS: Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net> * gst/ffmpegcolorspace/gstffmpegcodecmap.c: (gst_ffmpeg_caps_to_pixfmt): Fix for depth = 15. Fixes #161675.
This commit is contained in:
parent
5a7c2ff712
commit
a1ccb24080
2 changed files with 15 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2005-01-15 Gergely Nagy <algernon@bonehunter.rulez.org>
|
||||||
|
|
||||||
|
Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
|
* gst/ffmpegcolorspace/gstffmpegcodecmap.c:
|
||||||
|
(gst_ffmpeg_caps_to_pixfmt):
|
||||||
|
Fix for depth = 15. Fixes #161675.
|
||||||
|
|
||||||
2005-01-14 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
2005-01-14 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
* sys/v4l/gstv4lsrc.c: (gst_v4lsrc_getcaps):
|
* sys/v4l/gstv4lsrc.c: (gst_v4lsrc_getcaps):
|
||||||
|
|
|
@ -482,7 +482,7 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
|
||||||
}
|
}
|
||||||
} else if (strcmp (gst_structure_get_name (structure),
|
} else if (strcmp (gst_structure_get_name (structure),
|
||||||
"video/x-raw-rgb") == 0) {
|
"video/x-raw-rgb") == 0) {
|
||||||
gint bpp = 0, rmask = 0, endianness = 0, amask = 0;
|
gint bpp = 0, rmask = 0, endianness = 0, amask = 0, depth = 0;
|
||||||
|
|
||||||
if (gst_structure_get_int (structure, "bpp", &bpp) &&
|
if (gst_structure_get_int (structure, "bpp", &bpp) &&
|
||||||
gst_structure_get_int (structure, "endianness", &endianness)) {
|
gst_structure_get_int (structure, "endianness", &endianness)) {
|
||||||
|
@ -514,8 +514,13 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps,
|
||||||
context->pix_fmt = PIX_FMT_RGB24;
|
context->pix_fmt = PIX_FMT_RGB24;
|
||||||
break;
|
break;
|
||||||
case 16:
|
case 16:
|
||||||
if (endianness == G_BYTE_ORDER)
|
if (endianness == G_BYTE_ORDER) {
|
||||||
context->pix_fmt = PIX_FMT_RGB565;
|
context->pix_fmt = PIX_FMT_RGB565;
|
||||||
|
if (gst_structure_get_int (structure, "depth", &depth)) {
|
||||||
|
if (depth == 15)
|
||||||
|
context->pix_fmt = PIX_FMT_RGB555;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
if (endianness == G_BYTE_ORDER)
|
if (endianness == G_BYTE_ORDER)
|
||||||
|
|
Loading…
Reference in a new issue