pkt->flags |= PKT_FLAG_KEY;
static int wav_read_packet(AVFormatContext *s,                           AVPacket *pkt){    int ret, size;    AVStream *st;    if (url_feof(&s->pb))        return AVERROR_IO;    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 (av_new_packet(pkt, size))        return AVERROR_IO;    pkt->stream_index = 0;    ret = get_buffer(&s->pb, pkt->data, pkt->size);    if (ret < 0)        av_free_packet(pkt);    /* note: we need to modify the packet size here to handle the last       packet */    pkt->size = ret;    return ret;}