--- tcvp-0.2.0/src/codec/avcodec/avcodec.c 2004-03-08 15:48:34.000000000 +0100 +++ tcvp-0.2.0/src/codec/avcodec/avcodec.c 2006-04-05 11:42:21.000000000 +0200 @@ -280,11 +280,11 @@ p->format.video.codec = pixel_fmts[vc->ctx->pix_fmt]; p->format.video.width = vc->ctx->width; p->format.video.height = vc->ctx->height; - if(vc->ctx->frame_rate){ - vc->ptsn = (uint64_t) 27000000 * vc->ctx->frame_rate_base; - vc->ptsd = vc->ctx->frame_rate; - p->format.video.frame_rate.num = vc->ctx->frame_rate; - p->format.video.frame_rate.den = vc->ctx->frame_rate_base; + if(vc->ctx->time_base.num){ + vc->ptsn = (uint64_t) 27000000 * vc->ctx->time_base.num; + vc->ptsd = vc->ctx->time_base.den; + p->format.video.frame_rate.num = vc->ctx->time_base.den; + p->format.video.frame_rate.den = vc->ctx->time_base.num; } else { vc->ptsn = 27000000; vc->ptsd = 25; @@ -374,8 +374,8 @@ case STREAM_TYPE_VIDEO: avctx->width = s->video.width; avctx->height = s->video.height; - avctx->frame_rate = s->video.frame_rate.num; - avctx->frame_rate_base = s->video.frame_rate.den; + avctx->time_base.den = s->video.frame_rate.num; + avctx->time_base.num = s->video.frame_rate.den; ac->ptsn = (uint64_t) 27000000 * s->video.frame_rate.den; ac->ptsd = s->video.frame_rate.num?: 1; --- tcvp-0.2.0/src/codec/avcodec/encode.c 2004-05-06 20:14:47.000000000 +0200 +++ tcvp-0.2.0/src/codec/avcodec/encode.c 2006-04-05 11:42:58.000000000 +0200 @@ -96,8 +96,8 @@ p->format.common.codec = enc->codec; p->format.common.bit_rate = ctx->bit_rate; - ctx->frame_rate = s->video.frame_rate.num; - ctx->frame_rate_base = s->video.frame_rate.den; + ctx->time_base.den = s->video.frame_rate.num; + ctx->time_base.num = s->video.frame_rate.den; ctx->width = s->video.width; ctx->height = s->video.height; if(s->video.aspect.num){ --- tcvp-0.2.0/src/demuxer/avformat/avformat.c 2004-06-01 22:24:51.000000000 +0200 +++ tcvp-0.2.0/src/demuxer/avformat/avformat.c 2006-04-05 12:50:38.000000000 +0200 @@ -213,27 +213,27 @@ ms->n_streams = afc->nb_streams; ms->streams = calloc(ms->n_streams, sizeof(*ms->streams)); for(i = 0; i < ms->n_streams; i++){ - switch(afc->streams[i]->codec.codec_type){ + switch(afc->streams[i]->codec->codec_type){ case CODEC_TYPE_VIDEO: ms->streams[i].stream_type = STREAM_TYPE_VIDEO; ms->streams[i].video.frame_rate.num = - afc->streams[i]->codec.frame_rate; + afc->streams[i]->codec->time_base.den; ms->streams[i].video.frame_rate.den = - afc->streams[i]->codec.frame_rate_base; - ms->streams[i].video.width = afc->streams[i]->codec.width; - ms->streams[i].video.height = afc->streams[i]->codec.height; + afc->streams[i]->codec->time_base.num; + ms->streams[i].video.width = afc->streams[i]->codec->width; + ms->streams[i].video.height = afc->streams[i]->codec->height; ms->streams[i].video.codec = - codec_names[afc->streams[i]->codec.codec_id]; + codec_names[afc->streams[i]->codec->codec_id]; break; case CODEC_TYPE_AUDIO: ms->streams[i].stream_type = STREAM_TYPE_AUDIO; ms->streams[i].audio.sample_rate = - afc->streams[i]->codec.sample_rate; - ms->streams[i].audio.channels = afc->streams[i]->codec.channels; + afc->streams[i]->codec->sample_rate; + ms->streams[i].audio.channels = afc->streams[i]->codec->channels; ms->streams[i].audio.codec = - codec_names[afc->streams[i]->codec.codec_id]; - ms->streams[i].audio.bit_rate = afc->streams[i]->codec.bit_rate; + codec_names[afc->streams[i]->codec->codec_id]; + ms->streams[i].audio.bit_rate = afc->streams[i]->codec->bit_rate; break; default: @@ -241,9 +241,9 @@ break; } - ms->streams[i].common.codec_data = afc->streams[i]->codec.extradata; + ms->streams[i].common.codec_data = afc->streams[i]->codec->extradata; ms->streams[i].common.codec_data_size = - afc->streams[i]->codec.extradata_size; + afc->streams[i]->codec->extradata_size; ms->streams[i].common.index = i; } ms->used_streams = calloc(ms->n_streams, sizeof(*ms->used_streams)); --- tcvp-0.2.0/src/demuxer/avformat/avfwrite.c 2004-06-01 00:06:27.000000000 +0200 +++ tcvp-0.2.0/src/demuxer/avformat/avfwrite.c 2006-04-05 12:53:39.000000000 +0200 @@ -117,19 +117,19 @@ avf->streams[s->common.index].avidx = ai; avf->streams[s->common.index].used = 1; as = avf->fc.streams[ai]; - as->codec.codec_id = avf_codec_id(s->common.codec); - as->codec.coded_frame = avcodec_alloc_frame(); - as->codec.bit_rate = s->common.bit_rate; + as->codec->codec_id = avf_codec_id(s->common.codec); + as->codec->coded_frame = avcodec_alloc_frame(); + as->codec->bit_rate = s->common.bit_rate; if(s->stream_type == STREAM_TYPE_VIDEO){ - as->codec.codec_type = CODEC_TYPE_VIDEO; - as->codec.frame_rate = s->video.frame_rate.num; - as->codec.frame_rate_base = s->video.frame_rate.den; - as->codec.width = s->video.width; - as->codec.height = s->video.height; + as->codec->codec_type = CODEC_TYPE_VIDEO; + as->codec->time_base.den = s->video.frame_rate.num; + as->codec->time_base.num = s->video.frame_rate.den; + as->codec->width = s->video.width; + as->codec->height = s->video.height; } else if(s->stream_type == STREAM_TYPE_AUDIO){ - as->codec.codec_type = CODEC_TYPE_AUDIO; - as->codec.sample_rate = s->audio.sample_rate; - as->codec.channels = s->audio.channels; + as->codec->codec_type = CODEC_TYPE_AUDIO; + as->codec->sample_rate = s->audio.sample_rate; + as->codec->channels = s->audio.channels; } return PROBE_OK;