- st->codec.codec_type = CODEC_TYPE_AUDIO;
- st->codec.codec_tag = 1;
- st->codec.channels = channels;
- st->codec.sample_rate = sample_rate;
- st->codec.bits_per_sample = bytes_per_sample * 8;
- st->codec.bit_rate = sample_rate * bytes_per_sample * 8 * channels;
- st->codec.block_align = bytes_per_sample * channels;
+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
+ st->codec->codec_tag = 1;
+ st->codec->channels = channels;
+ st->codec->sample_rate = sample_rate;
+ st->codec->bits_per_coded_sample = bytes_per_sample * 8;
+ st->codec->bit_rate = sample_rate * bytes_per_sample * 8 * channels;
+ st->codec->block_align = bytes_per_sample * channels;