summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Keil <jkeil@users.sourceforge.net>2002-04-26 20:31:47 +0000
committerJuergen Keil <jkeil@users.sourceforge.net>2002-04-26 20:31:47 +0000
commitb96d33b573af28e47f185cedb6c3d7efda60d70f (patch)
tree875df29e68b6f56cebdfce07c5ff8271d23c17a9
parent5c51c07e4bd766085fd3ddbf8713cbf6d203e0db (diff)
downloadxine-lib-b96d33b573af28e47f185cedb6c3d7efda60d70f.tar.gz
xine-lib-b96d33b573af28e47f185cedb6c3d7efda60d70f.tar.bz2
Sun's Forte compiler has problems initializing a local structure variable with
bitfields. Use explicit assignments to work around this (compiler?) problem. CVS patchset: 1779 CVS date: 2002/04/26 20:31:47
-rw-r--r--src/libspucc/cc_decoder.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/libspucc/cc_decoder.c b/src/libspucc/cc_decoder.c
index 154991c68..a01241e13 100644
--- a/src/libspucc/cc_decoder.c
+++ b/src/libspucc/cc_decoder.c
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: cc_decoder.c,v 1.15 2002/04/24 20:26:07 jcdutton Exp $
+ * $Id: cc_decoder.c,v 1.16 2002/04/26 20:31:47 jkeil Exp $
*
* stuff needed to provide closed captioning decoding and display
*
@@ -453,8 +453,20 @@ static clut_t interpolate_color(clut_t src, clut_t dest, int steps,
int res_y = ((int) src.y) + (diff_y * current_step / (steps + 1));
int res_cr = ((int) src.cr) + (diff_cr * current_step / (steps + 1));
int res_cb = ((int) src.cb) + (diff_cb * current_step / (steps + 1));
+#if __SUNPRO_C
+ /*
+ * Sun's Forte compiler refuses to initialize automatic structure
+ * variable with bitfields, so we use explicit assignments for now.
+ */
+ clut_t res;
+ res.y = res_y;
+ res.cr = res_cr;
+ res.cb = res_cb;
+ res.foo = 0;
+#else
clut_t res = CLUT_Y_CR_CB_INIT((uint8_t) res_y, (uint8_t) res_cr,
(uint8_t) res_cb);
+#endif
return res;
}