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/wav.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/wav.c')
-rw-r--r-- | libavformat/wav.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavformat/wav.c b/libavformat/wav.c index 427453b3a8..6557c0a962 100644 --- a/libavformat/wav.c +++ b/libavformat/wav.c @@ -199,13 +199,13 @@ static int wav_write_header(AVFormatContext *s) /* format header */ fmt = start_tag(pb, "fmt "); - if (put_wav_header(pb, &s->streams[0]->codec) < 0) { + if (put_wav_header(pb, s->streams[0]->codec) < 0) { av_free(wav); return -1; } end_tag(pb, fmt); - 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); /* data header */ wav->data = start_tag(pb, "data"); @@ -305,10 +305,10 @@ static int wav_read_header(AVFormatContext *s, if (!st) return AVERROR_NOMEM; - get_wav_header(pb, &st->codec, size); + get_wav_header(pb, st->codec, size); st->need_parsing = 1; - av_set_pts_info(st, 64, 1, st->codec.sample_rate); + av_set_pts_info(st, 64, 1, st->codec->sample_rate); size = find_tag(pb, MKTAG('d', 'a', 't', 'a')); if (size < 0) @@ -329,10 +329,10 @@ static int wav_read_packet(AVFormatContext *s, st = s->streams[0]; size = MAX_SIZE; - if (st->codec.block_align > 1) { - if (size < st->codec.block_align) - size = st->codec.block_align; - size = (size / st->codec.block_align) * st->codec.block_align; + if (st->codec->block_align > 1) { + if (size < st->codec->block_align) + size = st->codec->block_align; + size = (size / st->codec->block_align) * st->codec->block_align; } if (av_new_packet(pkt, size)) return AVERROR_IO; @@ -358,7 +358,7 @@ static int wav_read_seek(AVFormatContext *s, AVStream *st; st = s->streams[0]; - switch(st->codec.codec_id) { + switch(st->codec->codec_id) { case CODEC_ID_MP2: case CODEC_ID_MP3: case CODEC_ID_AC3: |