diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-07-17 22:24:36 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-07-17 22:24:36 +0000 |
commit | 01f4895c682a1752bf6d138ffb0628470e16b85a (patch) | |
tree | 56a3dfce270dad38b97c8f7ff288cc23cfac54da /libavformat/mmf.c | |
parent | 4c1a012e9ceb0840688c547625208e7c4b81624a (diff) | |
download | ffmpeg-01f4895c682a1752bf6d138ffb0628470e16b85a.tar.gz |
changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
Originally committed as revision 4453 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mmf.c')
-rw-r--r-- | libavformat/mmf.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libavformat/mmf.c b/libavformat/mmf.c index 568f0ac0f1..82d70170bc 100644 --- a/libavformat/mmf.c +++ b/libavformat/mmf.c @@ -61,9 +61,9 @@ static int mmf_write_header(AVFormatContext *s) offset_t pos; int rate; - rate = mmf_rate_code(s->streams[0]->codec.sample_rate); + rate = mmf_rate_code(s->streams[0]->codec->sample_rate); if(rate < 0) { - av_log(s, AV_LOG_ERROR, "Unsupported sample rate %d\n", s->streams[0]->codec.sample_rate); + av_log(s, AV_LOG_ERROR, "Unsupported sample rate %d\n", s->streams[0]->codec->sample_rate); return -1; } @@ -96,7 +96,7 @@ static int mmf_write_header(AVFormatContext *s) mmf->awapos = start_tag(pb, "Awa\x01"); - av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec.sample_rate); + av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate); put_flush_packet(pb); @@ -144,7 +144,7 @@ static int mmf_write_trailer(AVFormatContext *s) /* "play wav" */ put_byte(pb, 0); /* start time */ put_byte(pb, 1); /* (channel << 6) | wavenum */ - gatetime = size * 500 / s->streams[0]->codec.sample_rate; + gatetime = size * 500 / s->streams[0]->codec->sample_rate; put_varlength(pb, gatetime); /* duration */ /* "nop" */ @@ -239,14 +239,14 @@ static int mmf_read_header(AVFormatContext *s, if (!st) return AVERROR_NOMEM; - st->codec.codec_type = CODEC_TYPE_AUDIO; - st->codec.codec_id = CODEC_ID_ADPCM_YAMAHA; - st->codec.sample_rate = rate; - st->codec.channels = 1; - st->codec.bits_per_sample = 4; - st->codec.bit_rate = st->codec.sample_rate * st->codec.bits_per_sample; + st->codec->codec_type = CODEC_TYPE_AUDIO; + st->codec->codec_id = CODEC_ID_ADPCM_YAMAHA; + st->codec->sample_rate = rate; + st->codec->channels = 1; + st->codec->bits_per_sample = 4; + st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_sample; - av_set_pts_info(st, 64, 1, st->codec.sample_rate); + av_set_pts_info(st, 64, 1, st->codec->sample_rate); return 0; } |