Revision 01f4895c libavformat/ffm.c

View differences:

libavformat/ffm.c
141 141
    bit_rate = 0;
142 142
    for(i=0;i<s->nb_streams;i++) {
143 143
        st = s->streams[i];
144
        bit_rate += st->codec.bit_rate;
144
        bit_rate += st->codec->bit_rate;
145 145
    }
146 146
    put_be32(pb, bit_rate);
147 147

  
......
154 154
        av_set_pts_info(st, 64, 1, 1000000);
155 155
        st->priv_data = fst;
156 156

  
157
        codec = &st->codec;
157
        codec = st->codec;
158 158
        /* generic info */
159 159
        put_be32(pb, codec->codec_id);
160 160
        put_byte(pb, codec->codec_type);
......
247 247
    int size= pkt->size;
248 248

  
249 249
    //XXX/FIXME use duration from pkt
250
    if (st->codec.codec_type == CODEC_TYPE_AUDIO) {
251
        duration = ((float)st->codec.frame_size / st->codec.sample_rate * 1000000.0);
250
    if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
251
        duration = ((float)st->codec->frame_size / st->codec->sample_rate * 1000000.0);
252 252
    } else {
253
        duration = (1000000.0 * st->codec.time_base.num / (float)st->codec.time_base.den);
253
        duration = (1000000.0 * st->codec->time_base.num / (float)st->codec->time_base.den);
254 254
    }
255 255

  
256 256
    pts = fst->pts;
......
485 485
            
486 486
        st->priv_data = fst;
487 487

  
488
        codec = &st->codec;
488
        codec = st->codec;
489 489
        /* generic info */
490
        st->codec.codec_id = get_be32(pb);
491
        st->codec.codec_type = get_byte(pb); /* codec_type */
490
        st->codec->codec_id = get_be32(pb);
491
        st->codec->codec_type = get_byte(pb); /* codec_type */
492 492
        codec->bit_rate = get_be32(pb);
493 493
	st->quality = get_be32(pb);
494 494
        codec->flags = get_be32(pb);

Also available in: Unified diff