put_padding(nut, bc);
static int nut_write_packet(AVFormatContext *s, int stream_index, 			    uint8_t *buf, int size, int force_pts){    NUTContext *nut = s->priv_data;    ByteIOContext *bc = &s->pb;    int key_frame = 0;    int flags, size2;    AVCodecContext *enc;    if (stream_index > s->nb_streams)	return 1;    enc = &s->streams[stream_index]->codec;    if (enc->codec_type == CODEC_TYPE_VIDEO)	key_frame = enc->coded_frame->key_frame;    put_packetheader(nut, bc, size+(key_frame?16:8)+4); /* FIXME: estimation */    if (key_frame)	put_be64(bc, KEYFRAME_STARTCODE);        flags=0;    flags<<=2; flags|=1; //priority    flags<<=1; flags|=0; //checksum    flags<<=1; flags|=0; //msb_timestamp_flag    flags<<=2; flags|=1; //subpacket_type    flags<<=1; flags|=0; //reserved    put_byte(bc, flags);    put_v(bc, stream_index);    put_s(bc, 0); /* lsb_timestamp */        put_buffer(bc, buf, size);        put_padding(nut, bc);    put_flush_packet(bc);    return 0;}