[xiph-commits] r11298 - trunk/theora/lib

msmith at svn.xiph.org msmith at svn.xiph.org
Thu Apr 27 11:06:17 PDT 2006


Author: msmith
Date: 2006-04-27 11:06:15 -0700 (Thu, 27 Apr 2006)
New Revision: 11298

Modified:
   trunk/theora/lib/toplevel.c
Log:
Reject reserved pixel format.
Return OC_IMPL for non-implemented pixel formats.


Modified: trunk/theora/lib/toplevel.c
===================================================================
--- trunk/theora/lib/toplevel.c	2006-04-27 18:04:24 UTC (rev 11297)
+++ trunk/theora/lib/toplevel.c	2006-04-27 18:06:15 UTC (rev 11298)
@@ -154,6 +154,11 @@
 
   theora_read(opb,2,&ret);
   ci->pixelformat=ret;
+  if(ci->pixelformat==OC_PF_RSVD)
+    return (OC_BADHEADER);
+  /* 4:2:2 and 4:4:4 not currently implemented */
+  else if(ci->pixelformat != OC_PF_420)
+    return (OC_IMPL);
 
   /* spare configuration bits */
   if ( theora_read(opb,3,&ret) == -1 )



More information about the commits mailing list