s->sample_rate = st->codec.sample_rate; s->channels = st->codec.channels;
s->sample_rate = st->codec->sample_rate; s->channels = st->codec->channels;
static int audio_write_header(AVFormatContext *s1){    AudioData *s = (AudioData *)s1->priv_data;    AVStream *st;    int ret;    st = s1->streams[0];    s->sample_rate = st->codec.sample_rate;    s->channels = st->codec.channels;    ret = audio_open(s, 1, NULL);    if (ret < 0)        return -EIO;    return 0;}