sys/fbdev/gstfbdevsink.c: Fix the Depth calculation.
authorLuotao Fu <l.fu@pengutronix.de>
Tue, 23 Dec 2008 12:25:47 +0000 (12:25 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Tue, 23 Dec 2008 12:25:47 +0000 (12:25 +0000)
Original commit message from CVS:
Patch by: Luotao Fu <l dot fu at pengutronix dot de>
* sys/fbdev/gstfbdevsink.c: (gst_fbdevsink_getcaps):
Fix the Depth calculation.
Fixes #564114.

ChangeLog
sys/fbdev/gstfbdevsink.c

index eba4c355637131d6323d57904337ada96b6d3e45..fd1f5f5c8c4d6807a1e1587d1e4e9573333afa95 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-12-23  Wim Taymans  <wim.taymans@collabora.co.uk>
+
+       Patch by: Luotao Fu <l dot fu at pengutronix dot de>
+
+       * sys/fbdev/gstfbdevsink.c: (gst_fbdevsink_getcaps):
+       Fix the Depth calculation.
+       Fixes #564114.
+
 2008-12-23  Wim Taymans  <wim.taymans@collabora.co.uk>
 
        Patch by: Arnout Vandecappelle <arnout at mind dot be>
index 0fb7d9815e34e2ed482c845aa5486e738879d9c7..6975f55db93efc0d32db0cad4fc52482972e29f9 100644 (file)
@@ -188,8 +188,10 @@ gst_fbdevsink_getcaps (GstBaseSink * bsink)
   caps = gst_caps_from_string (GST_VIDEO_CAPS_RGB_15);
   gst_caps_set_simple (caps,
       "bpp", G_TYPE_INT, fbdevsink->varinfo.bits_per_pixel,
-      "depth", G_TYPE_INT, fbdevsink->varinfo.bits_per_pixel
-      - fbdevsink->varinfo.transp.length,
+      "depth", G_TYPE_INT, fbdevsink->varinfo.red.length +
+      fbdevsink->varinfo.green.length +
+      fbdevsink->varinfo.blue.length +
+      fbdevsink->varinfo.transp.length,
       "endianness", G_TYPE_INT, endianness,
       "red_mask", G_TYPE_INT, rmask,
       "green_mask", G_TYPE_INT, gmask, "blue_mask", G_TYPE_INT, bmask, NULL);