Revision 1bd86246 libavcodec/vp3.c

View differences:

libavcodec/vp3.c
328 328
    int bounding_values_array[256];
329 329
} Vp3DecodeContext;
330 330

  
331
static int theora_decode_comments(AVCodecContext *avctx, GetBitContext gb);
332 331
static int theora_decode_tables(AVCodecContext *avctx, GetBitContext gb);
333 332

  
334 333
/************************************************************************
......
2737 2736
    return ret;
2738 2737
}
2739 2738

  
2740
static int theora_decode_comments(AVCodecContext *avctx, GetBitContext gb)
2741
{
2742
    Vp3DecodeContext *s = avctx->priv_data;
2743
    int len;
2744

  
2745
    if (s->theora <= 0x030200)
2746
    {
2747
        int i, comments;
2748

  
2749
        // vendor string
2750
        len = get_bits_long(&gb, 32);
2751
        len = le2me_32(len);
2752
        while(len--)
2753
            skip_bits(&gb, 8);
2754

  
2755
        // user comments
2756
        comments = get_bits_long(&gb, 32);
2757
        comments = le2me_32(comments);
2758
        for (i = 0; i < comments; i++)
2759
        {
2760
            len = get_bits_long(&gb, 32);
2761
            len = be2me_32(len);
2762
            while(len--)
2763
                skip_bits(&gb, 8);
2764
        }
2765
    }
2766
    else
2767
    {
2768
        do {
2769
            len = get_bits_long(&gb, 32);
2770
            len = le2me_32(len);
2771
            if (len <= 0)
2772
                break;
2773
            while (len--)
2774
                skip_bits(&gb, 8);
2775
        } while (1);
2776
    }
2777
    return 0;
2778
}
2779

  
2780 2739
static int theora_decode_tables(AVCodecContext *avctx, GetBitContext gb)
2781 2740
{
2782 2741
    Vp3DecodeContext *s = avctx->priv_data;

Also available in: Unified diff