diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/gwps-common.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index 2e0afab1ee..8fc1f36484 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c | |||
@@ -698,6 +698,15 @@ static void draw_player_fullbar(struct gui_wps *gwps, char* buf, int buf_size) | |||
698 | 698 | ||
699 | #endif /* HAVE_LCD_CHARCELL */ | 699 | #endif /* HAVE_LCD_CHARCELL */ |
700 | 700 | ||
701 | static char* get_codectype(const struct mp3entry* id3) | ||
702 | { | ||
703 | if (id3->codectype < AFMT_NUM_CODECS) { | ||
704 | return (char*)audio_formats[id3->codectype].label; | ||
705 | } else { | ||
706 | return NULL; | ||
707 | } | ||
708 | } | ||
709 | |||
701 | /* Extract a part from a path. | 710 | /* Extract a part from a path. |
702 | * | 711 | * |
703 | * buf - buffer extract part to. | 712 | * buf - buffer extract part to. |
@@ -983,7 +992,7 @@ static char *get_token_value(struct gui_wps *gwps, | |||
983 | else | 992 | else |
984 | *intval = id3->codectype; | 993 | *intval = id3->codectype; |
985 | } | 994 | } |
986 | return id3_get_codec(id3); | 995 | return get_codectype(id3); |
987 | 996 | ||
988 | case WPS_TOKEN_FILE_FREQUENCY: | 997 | case WPS_TOKEN_FILE_FREQUENCY: |
989 | snprintf(buf, buf_size, "%ld", id3->frequency); | 998 | snprintf(buf, buf_size, "%ld", id3->frequency); |