compute_pkt_fields2(st, pkt);
if(compute_pkt_fields2(st, pkt) < 0) return -1;
int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt){    AVStream *st= s->streams[ pkt->stream_index];    compute_pkt_fields2(st, pkt);        //FIXME/XXX/HACK drop zero sized packets    if(st->codec.codec_type == CODEC_TYPE_AUDIO && pkt->size==0)        return 0;        if(pkt->dts == AV_NOPTS_VALUE)        return -1;    for(;;){        AVPacket opkt;        int ret= av_interleave_packet(s, &opkt, pkt, 0);        if(ret<=0) //FIXME cleanup needed for ret<0 ?            return ret;                truncate_ts(s->streams[opkt.stream_index], &opkt);        ret= s->oformat->write_packet(s, &opkt);                av_free_packet(&opkt);        pkt= NULL;                if(ret<0)            return ret;        if(url_ferror(&s->pb))            return url_ferror(&s->pb);    }}