fix user data parsing code so it suppors pre1 and cvs
Originally committed as revision 4471 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
760fb54f7c
commit
91d44ffc9a
@ -5759,17 +5759,15 @@ static int decode_user_data(MpegEncContext *s, GetBitContext *gb){
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ffmpeg detection */
|
/* ffmpeg detection */
|
||||||
e=sscanf(buf, "FFmpeg%d.%d.%db%d", &ver, &ver2, &ver3, &build);
|
e=sscanf(buf, "FFmpe%*[^b]b%d", &build)+3;
|
||||||
if(e!=4)
|
if(e!=4)
|
||||||
e=sscanf(buf, "FFmpeg v%d.%d.%d / libavcodec build: %d", &ver, &ver2, &ver3, &build);
|
e=sscanf(buf, "FFmpeg v%d.%d.%d / libavcodec build: %d", &ver, &ver2, &ver3, &build);
|
||||||
if(e!=4){
|
if(e!=4){
|
||||||
if(strcmp(buf, "ffmpeg")==0){
|
if(strcmp(buf, "ffmpeg")==0){
|
||||||
s->ffmpeg_version= 0x000406;
|
|
||||||
s->lavc_build= 4600;
|
s->lavc_build= 4600;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(e==4){
|
if(e==4){
|
||||||
s->ffmpeg_version= ver*256*256 + ver2*256 + ver3;
|
|
||||||
s->lavc_build= build;
|
s->lavc_build= build;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -609,7 +609,6 @@ typedef struct MpegEncContext {
|
|||||||
int xvid_build;
|
int xvid_build;
|
||||||
|
|
||||||
/* lavc specific stuff, used to workaround bugs in libavcodec */
|
/* lavc specific stuff, used to workaround bugs in libavcodec */
|
||||||
int ffmpeg_version;
|
|
||||||
int lavc_build;
|
int lavc_build;
|
||||||
|
|
||||||
/* RV10 specific */
|
/* RV10 specific */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user