tmp = get_le32(bc)+get_le16(bc)+get_byte(bc); if (!tmp)
tmp<<=8 ; tmp |= get_byte(bc); tmp<<=16; tmp |= get_be16(bc); tmp<<=32; tmp |= get_be32(bc); if (tmp == KEYFRAME_STARTCODE)
static int nut_read_packet(AVFormatContext *s, AVPacket *pkt){    NUTContext *nut = s->priv_data;    ByteIOContext *bc = &s->pb;    int tmp, id, timestamp, size;    int key_frame = 0;    get_packetheader(nut, bc);    if (url_feof(bc))	return -1;        tmp = get_byte(bc);    if ((tmp & 0x7f) == 1) /* zero bit set? */    {	tmp = get_le32(bc)+get_le16(bc)+get_byte(bc);	if (!tmp)	{	    key_frame = 1;	    tmp = get_byte(bc); /* flags */	}	else	    fprintf(stderr, "error in zero bit / startcode\n");    }    if ((tmp & 0x9f) > 3) /* priority <= 3 */	fprintf(stderr, "sanity check failed!\n");    id = get_v(bc);    timestamp = get_s(bc);        size = (nut->curr_frame_size - (url_ftell(bc)-nut->curr_frame_start));    dprintf("flags: 0x%x, timestamp: %d, packet size: %d\n", tmp, timestamp, size);        if (size < 0)	return -1;    av_new_packet(pkt, size);    get_buffer(bc, pkt->data, size);    pkt->stream_index = id;    if (key_frame)	pkt->flags |= PKT_FLAG_KEY;    pkt->pts = timestamp;    return 0;}