buf[0]= show_bits(gb, 8); for(i=1; i<256; i++){ buf[i]= show_bits(gb, 16)&0xFF; if(buf[i]==0) break; skip_bits(gb, 8);
for(i=0; i<255; i++){ if(show_bits(gb, 23) == 0) break; buf[i]= get_bits(gb, 8);
static int decode_user_data(MpegEncContext *s, GetBitContext *gb){    char buf[256];    int i;    int e;    int ver, build, ver2, ver3;    char last;    buf[0]= show_bits(gb, 8);    for(i=1; i<256; i++){        buf[i]= show_bits(gb, 16)&0xFF;        if(buf[i]==0) break;        skip_bits(gb, 8);    }    buf[255]=0;    /* divx detection */    e=sscanf(buf, "DivX%dBuild%d%c", &ver, &build, &last);    if(e<2)        e=sscanf(buf, "DivX%db%d%c", &ver, &build, &last);    if(e>=2){        s->divx_version= ver;        s->divx_build= build;        s->divx_packed= e==3 && last=='p';    }        /* ffmpeg detection */    e=sscanf(buf, "FFmpeg%d.%d.%db%d", &ver, &ver2, &ver3, &build);    if(e!=4)        e=sscanf(buf, "FFmpeg v%d.%d.%d / libavcodec build: %d", &ver, &ver2, &ver3, &build);     if(e!=4){        if(strcmp(buf, "ffmpeg")==0){            s->ffmpeg_version= 0x000406;            s->lavc_build= 4600;        }    }    if(e==4){        s->ffmpeg_version= ver*256*256 + ver2*256 + ver3;        s->lavc_build= build;    }        /* xvid detection */    e=sscanf(buf, "XviD%d", &build);    if(e==1){        s->xvid_build= build;    }//printf("User Data: %s\n", buf);    return 0;}