Mercurial > libavformat.hg
diff ffm.c @ 820:feca73904e67 libavformat
changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
author | michael |
---|---|
date | Sun, 17 Jul 2005 22:24:36 +0000 |
parents | c5077fdab490 |
children | e8b4454b997d |
line wrap: on
line diff
--- a/ffm.c Sun Jul 17 00:28:12 2005 +0000 +++ b/ffm.c Sun Jul 17 22:24:36 2005 +0000 @@ -141,7 +141,7 @@ bit_rate = 0; for(i=0;i<s->nb_streams;i++) { st = s->streams[i]; - bit_rate += st->codec.bit_rate; + bit_rate += st->codec->bit_rate; } put_be32(pb, bit_rate); @@ -154,7 +154,7 @@ av_set_pts_info(st, 64, 1, 1000000); st->priv_data = fst; - codec = &st->codec; + codec = st->codec; /* generic info */ put_be32(pb, codec->codec_id); put_byte(pb, codec->codec_type); @@ -247,10 +247,10 @@ int size= pkt->size; //XXX/FIXME use duration from pkt - if (st->codec.codec_type == CODEC_TYPE_AUDIO) { - duration = ((float)st->codec.frame_size / st->codec.sample_rate * 1000000.0); + if (st->codec->codec_type == CODEC_TYPE_AUDIO) { + duration = ((float)st->codec->frame_size / st->codec->sample_rate * 1000000.0); } else { - duration = (1000000.0 * st->codec.time_base.num / (float)st->codec.time_base.den); + duration = (1000000.0 * st->codec->time_base.num / (float)st->codec->time_base.den); } pts = fst->pts; @@ -485,10 +485,10 @@ st->priv_data = fst; - codec = &st->codec; + codec = st->codec; /* generic info */ - st->codec.codec_id = get_be32(pb); - st->codec.codec_type = get_byte(pb); /* codec_type */ + st->codec->codec_id = get_be32(pb); + st->codec->codec_type = get_byte(pb); /* codec_type */ codec->bit_rate = get_be32(pb); st->quality = get_be32(pb); codec->flags = get_be32(pb);