Revision 01f4895c libavformat/oggparsetheora.c

View differences:

libavformat/oggparsetheora.c
40 40
    ogg_stream_t *os = ogg->streams + idx;
41 41
    AVStream *st = s->streams[idx];
42 42
    theora_params_t *thp = os->private;
43
    int cds = st->codec.extradata_size + os->psize + 2;
43
    int cds = st->codec->extradata_size + os->psize + 2;
44 44
    uint8_t *cdp;
45 45

  
46 46
    if(!(os->buf[os->pstart] & 0x80))
......
62 62
            return -1;
63 63
        skip_bits(&gb, 8);      /* revision */
64 64

  
65
        st->codec.width = get_bits(&gb, 16) << 4;
66
        st->codec.height = get_bits(&gb, 16) << 4;
65
        st->codec->width = get_bits(&gb, 16) << 4;
66
        st->codec->height = get_bits(&gb, 16) << 4;
67 67

  
68 68
        skip_bits(&gb, 64);
69
        st->codec.time_base.den = get_bits(&gb, 32);
70
        st->codec.time_base.num = get_bits(&gb, 32);
69
        st->codec->time_base.den = get_bits(&gb, 32);
70
        st->codec->time_base.num = get_bits(&gb, 32);
71 71
        
72
        st->codec.sample_aspect_ratio.num = get_bits(&gb, 24);
73
        st->codec.sample_aspect_ratio.den = get_bits(&gb, 24);
72
        st->codec->sample_aspect_ratio.num = get_bits(&gb, 24);
73
        st->codec->sample_aspect_ratio.den = get_bits(&gb, 24);
74 74

  
75 75
        skip_bits(&gb, 38);
76 76
        thp->gpshift = get_bits(&gb, 5);
77 77
	thp->gpmask = (1 << thp->gpshift) - 1;
78 78

  
79
        st->codec.codec_type = CODEC_TYPE_VIDEO;
80
        st->codec.codec_id = CODEC_ID_THEORA;
79
        st->codec->codec_type = CODEC_TYPE_VIDEO;
80
        st->codec->codec_id = CODEC_ID_THEORA;
81 81

  
82 82
    } else if (os->buf[os->pstart] == 0x83) {
83 83
        vorbis_comment (s, os->buf + os->pstart + 7, os->psize - 8);
84 84
    }
85 85

  
86
    st->codec.extradata = av_realloc (st->codec.extradata, cds);
87
    cdp = st->codec.extradata + st->codec.extradata_size;
86
    st->codec->extradata = av_realloc (st->codec->extradata, cds);
87
    cdp = st->codec->extradata + st->codec->extradata_size;
88 88
    *cdp++ = os->psize >> 8;
89 89
    *cdp++ = os->psize & 0xff;
90 90
    memcpy (cdp, os->buf + os->pstart, os->psize);
91
    st->codec.extradata_size = cds;
91
    st->codec->extradata_size = cds;
92 92

  
93 93
    return 1;
94 94
}
......
103 103
    uint64_t iframe = gp >> thp->gpshift;
104 104
    uint64_t pframe = gp & thp->gpmask;
105 105

  
106
    return (iframe + pframe) * AV_TIME_BASE * st->codec.time_base.num /
107
        st->codec.time_base.den;
106
    return (iframe + pframe) * AV_TIME_BASE * st->codec->time_base.num /
107
        st->codec->time_base.den;
108 108
}
109 109

  
110 110
ogg_codec_t theora_codec = {

Also available in: Unified diff