diff options
Diffstat (limited to 'apps/playback.c')
-rw-r--r-- | apps/playback.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/apps/playback.c b/apps/playback.c index 73a014c9a9..d600fff667 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -350,28 +350,12 @@ bool codec_seek_buffer_callback(off_t newpos) | |||
350 | return true; | 350 | return true; |
351 | } | 351 | } |
352 | 352 | ||
353 | char *rindex(const char *s, int c) | ||
354 | { | ||
355 | char *p = NULL; | ||
356 | |||
357 | if (s == NULL) | ||
358 | return NULL; | ||
359 | |||
360 | while (*s != '\0') { | ||
361 | if (*s == c) | ||
362 | p = (char *)s; | ||
363 | s++; | ||
364 | } | ||
365 | |||
366 | return p; | ||
367 | } | ||
368 | |||
369 | /* Simple file type probing by looking filename extension. */ | 353 | /* Simple file type probing by looking filename extension. */ |
370 | int probe_file_format(const char *filename) | 354 | int probe_file_format(const char *filename) |
371 | { | 355 | { |
372 | char *suffix; | 356 | char *suffix; |
373 | 357 | ||
374 | suffix = rindex(filename, '.'); | 358 | suffix = strrchr(filename, '.'); |
375 | if (suffix == NULL) | 359 | if (suffix == NULL) |
376 | return AFMT_UNKNOWN; | 360 | return AFMT_UNKNOWN; |
377 | suffix += 1; | 361 | suffix += 1; |