胡斌

fix compile error in linux

@@ -340,12 +340,16 @@ float get_mp4_duration(const char *mediafile, bool bVideo) @@ -340,12 +340,16 @@ float get_mp4_duration(const char *mediafile, bool bVideo)
340 return parse_ffmpeg_duration(buf); 340 return parse_ffmpeg_duration(buf);
341 } 341 }
342 342
  343 +#ifdef WIN32
  344 +#define strcasecmp _stricmp
  345 +#endif
  346 +
343 float get_file_duration(const char *mediafile, bool bVideo) 347 float get_file_duration(const char *mediafile, bool bVideo)
344 { 348 {
345 char buf[2048]; 349 char buf[2048];
346 int len = strlen(mediafile); 350 int len = strlen(mediafile);
347 if (len > 3) { 351 if (len > 3) {
348 - if (!_stricmp(mediafile + len - 4, ".mp4")) { 352 + if (!strcasecmp(mediafile + len - 4, ".mp4")) {
349 return get_mp4_duration(mediafile, bVideo); 353 return get_mp4_duration(mediafile, bVideo);
350 } 354 }
351 } 355 }
@@ -384,12 +384,16 @@ float get_mp4_duration(const char *mediafile, bool bVideo) @@ -384,12 +384,16 @@ float get_mp4_duration(const char *mediafile, bool bVideo)
384 return parse_ffmpeg_duration(buf); 384 return parse_ffmpeg_duration(buf);
385 } 385 }
386 386
  387 +#ifdef WIN32
  388 +#define strcasecmp _stricmp
  389 +#endif
  390 +
387 float get_file_duration(const char *mediafile, bool bVideo) 391 float get_file_duration(const char *mediafile, bool bVideo)
388 { 392 {
389 char buf[2048]; 393 char buf[2048];
390 int len = strlen(mediafile); 394 int len = strlen(mediafile);
391 if (len > 3) { 395 if (len > 3) {
392 - if (!_stricmp(mediafile + len - 4, ".mp4")) { 396 + if (!strcasecmp(mediafile + len - 4, ".mp4")) {
393 return get_mp4_duration(mediafile, bVideo); 397 return get_mp4_duration(mediafile, bVideo);
394 } 398 }
395 } 399 }