changeset 1518:c66cdace3bf6 libavcodec

theora comments skipping
author alex
date Sat, 11 Oct 2003 19:40:45 +0000
parents d107c545d745
children b44267fc5ec4
files vp3.c
diffstat 1 files changed, 20 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vp3.c	Sat Oct 11 17:48:49 2003 +0000
+++ b/vp3.c	Sat Oct 11 19:40:45 2003 +0000
@@ -2890,6 +2890,25 @@
     return 0;
 }
 
+static int theora_decode_comments(AVCodecContext *avctx, GetBitContext gb)
+{
+    int nb_comments, i, tmp;
+
+    tmp = get_bits(&gb, 32);
+    while(tmp-=8)
+	skip_bits(&gb, 8);
+
+    nb_comments = get_bits(&gb, 32);
+    for (i = 0; i < nb_comments; i++)
+    {
+	tmp = get_bits(&gb, 32);
+	while(tmp-=8)
+	    skip_bits(&gb, 8);
+    }
+    
+    return 0;
+}
+
 static int theora_decode_tables(AVCodecContext *avctx, GetBitContext gb)
 {
     Vp3DecodeContext *s = avctx->priv_data;
@@ -2948,7 +2967,7 @@
 	    vp3_decode_init(avctx);
     	    break;
 	case 0x81:
-	    /* comment */
+	    theora_decode_comments(avctx, gb);
 	    break;
 	case 0x82:
 	    theora_decode_tables(avctx, gb);