st = malloc(sizeof(AVStream));
st = av_malloc(sizeof(AVStream));
static int raw_read_header(AVFormatContext *s,                           AVFormatParameters *ap){    AVStream *st;    st = malloc(sizeof(AVStream));    if (!st)        return -1;    s->nb_streams = 1;    s->streams[0] = st;    st->id = 0;    if (ap) {        if (s->format->audio_codec != CODEC_ID_NONE) {            st->codec.codec_type = CODEC_TYPE_AUDIO;            st->codec.codec_id = s->format->audio_codec;        } else if (s->format->video_codec != CODEC_ID_NONE) {            st->codec.codec_type = CODEC_TYPE_VIDEO;            st->codec.codec_id = s->format->video_codec;        } else {            free(st);            return -1;        }                switch(st->codec.codec_type) {        case CODEC_TYPE_AUDIO:            st->codec.sample_rate = ap->sample_rate;            st->codec.channels = ap->channels;            break;        case CODEC_TYPE_VIDEO:            st->codec.frame_rate = ap->frame_rate;            st->codec.width = ap->width;            st->codec.height = ap->height;            break;        default:            return -1;        }    } else {        return -1;    }    return 0;}