胡斌

fix compile error in linux

... ... @@ -340,12 +340,16 @@ float get_mp4_duration(const char *mediafile, bool bVideo)
return parse_ffmpeg_duration(buf);
}
#ifdef WIN32
#define strcasecmp _stricmp
#endif
float get_file_duration(const char *mediafile, bool bVideo)
{
char buf[2048];
int len = strlen(mediafile);
if (len > 3) {
if (!_stricmp(mediafile + len - 4, ".mp4")) {
if (!strcasecmp(mediafile + len - 4, ".mp4")) {
return get_mp4_duration(mediafile, bVideo);
}
}
... ...
... ... @@ -384,12 +384,16 @@ float get_mp4_duration(const char *mediafile, bool bVideo)
return parse_ffmpeg_duration(buf);
}
#ifdef WIN32
#define strcasecmp _stricmp
#endif
float get_file_duration(const char *mediafile, bool bVideo)
{
char buf[2048];
int len = strlen(mediafile);
if (len > 3) {
if (!_stricmp(mediafile + len - 4, ".mp4")) {
if (!strcasecmp(mediafile + len - 4, ".mp4")) {
return get_mp4_duration(mediafile, bVideo);
}
}
... ...