From 87490ce9526b4742fdb38e137975c1eb0b598732 Mon Sep 17 00:00:00 2001 From: "Joshua M. Doe" Date: Tue, 10 Jun 2014 15:17:00 -0400 Subject: [PATCH] niimaqdxsrc: use depth instead of bpp to correctly calculate stride --- sys/niimaqdx/gstniimaqdx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/niimaqdx/gstniimaqdx.c b/sys/niimaqdx/gstniimaqdx.c index 3cb4c5f..393cb06 100644 --- a/sys/niimaqdx/gstniimaqdx.c +++ b/sys/niimaqdx/gstniimaqdx.c @@ -225,7 +225,7 @@ gst_niimaqdxsrc_pixel_format_from_caps (const GstCaps * caps, int *endianness) } static int -gst_niimaqdxsrc_pixel_format_get_bpp (const char *pixel_format, int endianness) +gst_niimaqdxsrc_pixel_format_get_depth (const char *pixel_format, int endianness) { ImaqDxCapsInfo *info = gst_niimaqdxsrc_get_caps_info (pixel_format, endianness); @@ -233,14 +233,14 @@ gst_niimaqdxsrc_pixel_format_get_bpp (const char *pixel_format, int endianness) if (!info) return 0; - return info->bpp; + return info->depth; } static int gst_niimaqdxsrc_pixel_format_get_stride (const char *pixel_format, int endianness, int width) { - return width * gst_niimaqdxsrc_pixel_format_get_bpp (pixel_format, + return width * gst_niimaqdxsrc_pixel_format_get_depth (pixel_format, endianness) / 8; }