summaryrefslogtreecommitdiff
path: root/apps/iap/iap-lingo4.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/iap/iap-lingo4.c')
-rw-r--r--apps/iap/iap-lingo4.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/iap/iap-lingo4.c b/apps/iap/iap-lingo4.c
index e1ab150fd9..6eb63003a5 100644
--- a/apps/iap/iap-lingo4.c
+++ b/apps/iap/iap-lingo4.c
@@ -1787,7 +1787,6 @@ void iap_handlepkt_mode4(const unsigned int len, const unsigned char *buf)
1787 { 1787 {
1788 unsigned char data[70] = {0x04, 0x00, 0xFF}; 1788 unsigned char data[70] = {0x04, 0x00, 0xFF};
1789 struct mp3entry id3; 1789 struct mp3entry id3;
1790 int fd;
1791 size_t len; 1790 size_t len;
1792 long tracknum = get_u32(&buf[3]); 1791 long tracknum = get_u32(&buf[3]);
1793 1792
@@ -1802,10 +1801,8 @@ void iap_handlepkt_mode4(const unsigned int len, const unsigned char *buf)
1802 { 1801 {
1803 struct playlist_track_info info; 1802 struct playlist_track_info info;
1804 playlist_get_track_info(NULL, tracknum, &info); 1803 playlist_get_track_info(NULL, tracknum, &info);
1805 fd = open(info.filename, O_RDONLY); 1804 /* memset(&id3, 0, sizeof(struct mp3entry)); --get_metadata does this for us */
1806 memset(&id3, 0, sizeof(struct mp3entry)); 1805 get_metadata(&id3, -1, info.filename);
1807 get_metadata(&id3, fd, info.filename);
1808 close(fd);
1809 } 1806 }
1810 /* Return the requested track data */ 1807 /* Return the requested track data */
1811 switch(cmd) 1808 switch(cmd)