[xiph-commits] r11098 - trunk/theora/lib
giles at svn.xiph.org
giles at svn.xiph.org
Wed Apr 5 10:18:48 PDT 2006
Author: giles
Date: 2006-04-05 10:18:47 -0700 (Wed, 05 Apr 2006)
New Revision: 11098
Modified:
trunk/theora/lib/decode.c
Log:
Correct compiler warnings. I thought we had checked this, but Ticket
#823 claims that MSVC Express Edition (probably 2005) generates code
where the undefined value of MVect[1] in DecodeMVectors() is used.
We therefore define a default value of 0 for all the MVect variables,
not just the first one.
Modified: trunk/theora/lib/decode.c
===================================================================
--- trunk/theora/lib/decode.c 2006-04-05 13:21:01 UTC (rev 11097)
+++ trunk/theora/lib/decode.c 2006-04-05 17:18:47 UTC (rev 11098)
@@ -5,7 +5,7 @@
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
- * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2003 *
+ * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2006 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
@@ -305,6 +305,9 @@
if (ret)
MVectComponent = -MVectComponent;
break;
+ default:
+ /* occurs if there is a read error */
+ MVectComponent = 0;
}
return MVectComponent;
@@ -352,9 +355,19 @@
return;
}
- /* set the default motion vector to 0,0 */
+ /* set the default motion vectors to 0,0 */
MVect[0].x = 0;
MVect[0].y = 0;
+ MVect[1].x = 0;
+ MVect[1].y = 0;
+ MVect[2].x = 0;
+ MVect[2].y = 0;
+ MVect[3].x = 0;
+ MVect[3].y = 0;
+ MVect[4].x = 0;
+ MVect[4].y = 0;
+ MVect[5].x = 0;
+ MVect[5].y = 0;
LastInterMV.x = 0;
LastInterMV.y = 0;
PriorLastInterMV.x = 0;
More information about the commits
mailing list