forked from len0rd/rockbox
Killed a nasty bug that could leave the recorded file open. This will cause the file to be 0 bytes long.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3247 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
07ad7c07b0
commit
bf0ac613ea
1 changed files with 7 additions and 2 deletions
|
@ -489,11 +489,12 @@ static bool saving; /* We are saving the buffer to disk */
|
||||||
|
|
||||||
static int mpeg_file;
|
static int mpeg_file;
|
||||||
|
|
||||||
#ifdef HAVE_MAS3587F
|
|
||||||
/* Synchronization variables */
|
/* Synchronization variables */
|
||||||
|
#ifdef HAVE_MAS3587F
|
||||||
static bool init_recording_done;
|
static bool init_recording_done;
|
||||||
static bool init_playback_done;
|
static bool init_playback_done;
|
||||||
#endif
|
#endif
|
||||||
|
static bool mpeg_stop_done;
|
||||||
|
|
||||||
static void recalculate_watermark(int bitrate)
|
static void recalculate_watermark(int bitrate)
|
||||||
{
|
{
|
||||||
|
@ -1335,6 +1336,7 @@ static void mpeg_thread(void)
|
||||||
is_playing = false;
|
is_playing = false;
|
||||||
paused = false;
|
paused = false;
|
||||||
stop_playing();
|
stop_playing();
|
||||||
|
mpeg_stop_done = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MPEG_PAUSE:
|
case MPEG_PAUSE:
|
||||||
|
@ -1836,6 +1838,7 @@ static void mpeg_thread(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
mpeg_stop_done = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MPEG_SAVE_DATA:
|
case MPEG_SAVE_DATA:
|
||||||
|
@ -2240,7 +2243,9 @@ void mpeg_play(int offset)
|
||||||
void mpeg_stop(void)
|
void mpeg_stop(void)
|
||||||
{
|
{
|
||||||
#ifndef SIMULATOR
|
#ifndef SIMULATOR
|
||||||
|
mpeg_stop_done = false;
|
||||||
queue_post(&mpeg_queue, MPEG_STOP, NULL);
|
queue_post(&mpeg_queue, MPEG_STOP, NULL);
|
||||||
|
while(!mpeg_stop_done)
|
||||||
yield();
|
yield();
|
||||||
#else
|
#else
|
||||||
is_playing = false;
|
is_playing = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue