e=sscanf(buf, "XviD%d", &build); if(e==1){ s->xvid_build= build; if(s->picture_number==0) printf("This file was encoded with XviD build %d\n", build); }
static int decode_user_data(MpegEncContext *s, GetBitContext *gb){    char buf[256];    int i;    int e;    int ver, build, ver2, ver3;    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;    e=sscanf(buf, "DivX%dBuild%d", &ver, &build);    if(e!=2)        e=sscanf(buf, "DivX%db%d", &ver, &build);    if(e==2){        s->divx_version= ver;        s->divx_build= build;        if(s->picture_number==0){            printf("This file was encoded with DivX%d Build%d\n", ver, build);            if(ver==500 && build==413){                printf("WARNING: this version of DivX is not MPEG4 compatible, trying to workaround these bugs...\n");            }        }    }    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;        if(s->picture_number==0)            printf("This file was encoded with libavcodec build %d\n", build);    }//printf("User Data: %s\n", buf);    return 0;}