summaryrefslogtreecommitdiff
path: root/apps/play.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/play.c')
-rw-r--r--apps/play.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/play.c b/apps/play.c
index aae7895d87..5949372e04 100644
--- a/apps/play.c
+++ b/apps/play.c
@@ -38,15 +38,16 @@
38 38
39#define LINE_Y 1 /* initial line */ 39#define LINE_Y 1 /* initial line */
40 40
41void playtune(char *dir, char *file) 41void playtune(char *filename)
42{ 42{
43 static char mfile[256]; 43 static char mfile[256];
44 char buffer[256];
45 mp3entry mp3; 44 mp3entry mp3;
46 bool good=1; 45 bool good=1;
46#ifdef HAVE_LCD_BITMAP
47 char buffer[256];
48#endif
47 49
48 snprintf(buffer, sizeof(buffer), "%s/%s", dir, file); 50 if(mp3info(&mp3, filename)) {
49 if(mp3info(&mp3, buffer)) {
50 DEBUGF("id3 failure!"); 51 DEBUGF("id3 failure!");
51 good=0; 52 good=0;
52 } 53 }
@@ -84,7 +85,7 @@ void playtune(char *dir, char *file)
84 lcd_update(); 85 lcd_update();
85#endif 86#endif
86 87
87 snprintf(mfile, sizeof(mfile), "%s/%s", dir, file); 88 strncpy(mfile, filename, 256);
88 mpeg_play(mfile); 89 mpeg_play(mfile);
89 90
90 while(1) { 91 while(1) {