diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-06-19 06:19:00 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-06-19 06:19:00 +0000 |
| commit | 60ed5ee4a120a92b34bdbd8c623303d2cce5a8d4 (patch) | |
| tree | b5308a3f953408dea07c6e12b136e135fcbb26e5 | |
| parent | 2a72553b2499b5323f02126dd2e402b447df354a (diff) | |
| download | rockbox-60ed5ee4a120a92b34bdbd8c623303d2cce5a8d4.zip rockbox-60ed5ee4a120a92b34bdbd8c623303d2cce5a8d4.tar.gz rockbox-60ed5ee4a120a92b34bdbd8c623303d2cce5a8d4.tar.bz2 rockbox-60ed5ee4a120a92b34bdbd8c623303d2cce5a8d4.tar.xz | |
MPEG_PLAY now closes mpeg_file if it is open
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1068 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/mpeg.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 394d182..754c240 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c @@ -134,7 +134,7 @@ static bool dma_on; /* The DMA is active */ static bool playing; /* We are playing an MP3 stream */ static bool filling; /* We are filling the buffer with data from disk */ -static int mpeg_file = -1; +static int mpeg_file; static void mas_poll_start(int interval_in_ms) { @@ -302,6 +302,7 @@ static void mpeg_thread(void) play_pending = false; playing = false; + mpeg_file = -1; while(1) { @@ -318,6 +319,9 @@ static void mpeg_thread(void) reset_mp3_buffer(); + if(mpeg_file >= 0) + close(mpeg_file); + mpeg_file = open((char*)ev.data, O_RDONLY); if(mpeg_file < 0) { |