Revision ee89b2b9

View differences:

libavcodec/vp3.c
2919 2919
    Vp3DecodeContext *s = avctx->priv_data;
2920 2920
    GetBitContext gb;
2921 2921
    int ptype;
2922
    uint8_t *p= avctx->extradata;
2923
    int op_bytes, i;
2922 2924
    
2923 2925
    s->theora = 1;
2924 2926

  
2925 2927
    if (!avctx->extradata_size)
2926 2928
	return -1;
2927 2929

  
2928
    init_get_bits(&gb, avctx->extradata, avctx->extradata_size);
2930
  for(i=0;i<3;i++) {
2931
    op_bytes = *(p++)<<8;
2932
    op_bytes += *(p++);
2933

  
2934
    init_get_bits(&gb, p, op_bytes);
2935
    p += op_bytes;
2929 2936

  
2930 2937
    ptype = get_bits(&gb, 8);
2931 2938
    debug_vp3("Theora headerpacket type: %x\n", ptype);
......
2948 2955
	    theora_decode_tables(avctx, gb);
2949 2956
	    break;
2950 2957
    }
2958
  }
2951 2959

  
2952 2960
    return 0;
2953 2961
}

Also available in: Unified diff