diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playback.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/apps/playback.c b/apps/playback.c index d974480c35..baed012ddf 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -557,7 +557,6 @@ int audio_current_aa_hid(void) | |||
557 | struct mp3entry* audio_current_track(void) | 557 | struct mp3entry* audio_current_track(void) |
558 | { | 558 | { |
559 | const char *filename; | 559 | const char *filename; |
560 | static struct mp3entry temp_id3; | ||
561 | struct playlist_track_info trackinfo; | 560 | struct playlist_track_info trackinfo; |
562 | int cur_idx; | 561 | int cur_idx; |
563 | int offset = ci.new_track + wps_offset; | 562 | int offset = ci.new_track + wps_offset; |
@@ -580,15 +579,15 @@ struct mp3entry* audio_current_track(void) | |||
580 | else if (tracks[cur_idx].id3_hid >= 0) | 579 | else if (tracks[cur_idx].id3_hid >= 0) |
581 | { | 580 | { |
582 | /* The current track's info has been buffered but not read yet, so get it */ | 581 | /* The current track's info has been buffered but not read yet, so get it */ |
583 | if (bufread(tracks[cur_idx].id3_hid, sizeof(struct mp3entry), &temp_id3) | 582 | if (bufread(tracks[cur_idx].id3_hid, sizeof(struct mp3entry), thistrack_id3) |
584 | == sizeof(struct mp3entry)) | 583 | == sizeof(struct mp3entry)) |
585 | return &temp_id3; | 584 | return thistrack_id3; |
586 | } | 585 | } |
587 | 586 | ||
588 | /* We didn't find the ID3 metadata, so we fill temp_id3 with the little info | 587 | /* We didn't find the ID3 metadata, so we fill temp_id3 with the little info |
589 | we have and return that. */ | 588 | we have and return that. */ |
590 | 589 | ||
591 | memset(&temp_id3, 0, sizeof(struct mp3entry)); | 590 | memset(thistrack_id3, 0, sizeof(struct mp3entry)); |
592 | 591 | ||
593 | playlist_get_track_info(NULL, playlist_next(0)+wps_offset, &trackinfo); | 592 | playlist_get_track_info(NULL, playlist_next(0)+wps_offset, &trackinfo); |
594 | filename = trackinfo.filename; | 593 | filename = trackinfo.filename; |
@@ -596,18 +595,18 @@ struct mp3entry* audio_current_track(void) | |||
596 | filename = "No file!"; | 595 | filename = "No file!"; |
597 | 596 | ||
598 | #if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) | 597 | #if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) |
599 | if (tagcache_fill_tags(&temp_id3, filename)) | 598 | if (tagcache_fill_tags(thistrack_id3, filename)) |
600 | return &temp_id3; | 599 | return thistrack_id3; |
601 | #endif | 600 | #endif |
602 | 601 | ||
603 | strncpy(temp_id3.path, filename, sizeof(temp_id3.path)-1); | 602 | strncpy(thistrack_id3->path, filename, sizeof(thistrack_id3->path)-1); |
604 | temp_id3.title = strrchr(temp_id3.path, '/'); | 603 | thistrack_id3->title = strrchr(thistrack_id3->path, '/'); |
605 | if (!temp_id3.title) | 604 | if (!thistrack_id3->title) |
606 | temp_id3.title = &temp_id3.path[0]; | 605 | thistrack_id3->title = &thistrack_id3->path[0]; |
607 | else | 606 | else |
608 | temp_id3.title++; | 607 | thistrack_id3->title++; |
609 | 608 | ||
610 | return &temp_id3; | 609 | return thistrack_id3; |
611 | } | 610 | } |
612 | 611 | ||
613 | struct mp3entry* audio_next_track(void) | 612 | struct mp3entry* audio_next_track(void) |