changeset 10251:95dc2037fb27

just updated vd_theora.c to decode the additional header packets, introduced by recent changes in Theora CVS which broke the current support. I'll be able to upload a newly encoded sample by tuesday. patch by David Kuehling <dvdkhlng@gmx.de> note: theora comment decoding disabled for backward compatibility,. result wasn't used anyway --A'rpi
author arpi
date Fri, 06 Jun 2003 19:19:23 +0000
parents 2bf4914e2253
children d275152390ee
files libmpcodecs/vd_theora.c
diffstat 1 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_theora.c	Fri Jun 06 19:12:08 2003 +0000
+++ b/libmpcodecs/vd_theora.c	Fri Jun 06 19:19:23 2003 +0000
@@ -41,6 +41,7 @@
     int failed = 1;
     int errorCode = 0;
     ogg_packet op;
+//    theora_comment tc;
 
     /* check whether video output format is supported */
     switch(sh->codec->outfmt[sh->outfmtidx])
@@ -69,6 +70,27 @@
 	  break;
        }
 
+       /* decode comment packet */
+       op.bytes = ds_get_packet (sh->ds,&op.packet);
+       op.b_o_s  = 1;
+#if 0
+       if((errorCode = theora_decode_comment (&tc, &op))) {
+	  mp_msg(MSGT_DECVIDEO,MSGL_ERR, 
+		 "Broken Theora comment; erroroCode=%i!\n", errorCode);
+	  break;
+       }
+#endif
+
+       /* decode tables packet */
+       op.bytes = ds_get_packet (sh->ds,&op.packet);
+       op.b_o_s  = 1;
+       if((errorCode = theora_decode_tables (&context->inf, &op))) {
+	  mp_msg(MSGT_DECVIDEO,MSGL_ERR, 
+		 "Broken Theora comment; erroroCode=%i!\n", errorCode);
+	  break;
+       }
+
+       /* now init codec */
        errorCode = theora_decode_init (&context->st, &context->inf);
        if (errorCode)
        {