summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer/stream_mgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/mpegplayer/stream_mgr.c')
-rw-r--r--apps/plugins/mpegplayer/stream_mgr.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/plugins/mpegplayer/stream_mgr.c b/apps/plugins/mpegplayer/stream_mgr.c
index 424d2fe503..222ffb7d6b 100644
--- a/apps/plugins/mpegplayer/stream_mgr.c
+++ b/apps/plugins/mpegplayer/stream_mgr.c
@@ -908,7 +908,7 @@ static void stream_mgr_thread(void)
908/* Opens a new file */ 908/* Opens a new file */
909int stream_open(const char *filename) 909int stream_open(const char *filename)
910{ 910{
911 if (stream_mgr.thread != NULL) 911 if (stream_mgr.thread != 0)
912 return stream_mgr_send_msg(STREAM_OPEN, (intptr_t)filename); 912 return stream_mgr_send_msg(STREAM_OPEN, (intptr_t)filename);
913 return STREAM_ERROR; 913 return STREAM_ERROR;
914} 914}
@@ -916,7 +916,7 @@ int stream_open(const char *filename)
916/* Plays the current file starting at time 'start' */ 916/* Plays the current file starting at time 'start' */
917int stream_play(void) 917int stream_play(void)
918{ 918{
919 if (stream_mgr.thread != NULL) 919 if (stream_mgr.thread != 0)
920 return stream_mgr_send_msg(STREAM_PLAY, 0); 920 return stream_mgr_send_msg(STREAM_PLAY, 0);
921 return STREAM_ERROR; 921 return STREAM_ERROR;
922} 922}
@@ -924,7 +924,7 @@ int stream_play(void)
924/* Pauses playback if playing */ 924/* Pauses playback if playing */
925int stream_pause(void) 925int stream_pause(void)
926{ 926{
927 if (stream_mgr.thread != NULL) 927 if (stream_mgr.thread != 0)
928 return stream_mgr_send_msg(STREAM_PAUSE, false); 928 return stream_mgr_send_msg(STREAM_PAUSE, false);
929 return STREAM_ERROR; 929 return STREAM_ERROR;
930} 930}
@@ -932,7 +932,7 @@ int stream_pause(void)
932/* Resumes playback if paused */ 932/* Resumes playback if paused */
933int stream_resume(void) 933int stream_resume(void)
934{ 934{
935 if (stream_mgr.thread != NULL) 935 if (stream_mgr.thread != 0)
936 return stream_mgr_send_msg(STREAM_PAUSE, true); 936 return stream_mgr_send_msg(STREAM_PAUSE, true);
937 return STREAM_ERROR; 937 return STREAM_ERROR;
938} 938}
@@ -940,7 +940,7 @@ int stream_resume(void)
940/* Stops playback if not stopped */ 940/* Stops playback if not stopped */
941int stream_stop(void) 941int stream_stop(void)
942{ 942{
943 if (stream_mgr.thread != NULL) 943 if (stream_mgr.thread != 0)
944 return stream_mgr_send_msg(STREAM_STOP, 0); 944 return stream_mgr_send_msg(STREAM_STOP, 0);
945 return STREAM_ERROR; 945 return STREAM_ERROR;
946} 946}
@@ -950,7 +950,7 @@ int stream_seek(uint32_t time, int whence)
950{ 950{
951 int ret; 951 int ret;
952 952
953 if (stream_mgr.thread == NULL) 953 if (stream_mgr.thread == 0)
954 return STREAM_ERROR; 954 return STREAM_ERROR;
955 955
956 stream_mgr_lock(); 956 stream_mgr_lock();
@@ -968,7 +968,7 @@ int stream_seek(uint32_t time, int whence)
968/* Closes the current file */ 968/* Closes the current file */
969int stream_close(void) 969int stream_close(void)
970{ 970{
971 if (stream_mgr.thread != NULL) 971 if (stream_mgr.thread != 0)
972 return stream_mgr_send_msg(STREAM_CLOSE, 0); 972 return stream_mgr_send_msg(STREAM_CLOSE, 0);
973 return STREAM_ERROR; 973 return STREAM_ERROR;
974} 974}
@@ -1018,7 +1018,7 @@ int stream_init(void)
1018 rb->queue_enable_queue_send(stream_mgr.q, &stream_mgr_queue_send, 1018 rb->queue_enable_queue_send(stream_mgr.q, &stream_mgr_queue_send,
1019 stream_mgr.thread); 1019 stream_mgr.thread);
1020 1020
1021 if (stream_mgr.thread == NULL) 1021 if (stream_mgr.thread == 0)
1022 { 1022 {
1023 rb->splash(HZ, "Could not create stream manager thread!"); 1023 rb->splash(HZ, "Could not create stream manager thread!");
1024 return STREAM_ERROR; 1024 return STREAM_ERROR;
@@ -1073,11 +1073,11 @@ void stream_exit(void)
1073 disk_buf_exit(); 1073 disk_buf_exit();
1074 pcm_output_exit(); 1074 pcm_output_exit();
1075 1075
1076 if (stream_mgr.thread != NULL) 1076 if (stream_mgr.thread != 0)
1077 { 1077 {
1078 stream_mgr_post_msg(STREAM_QUIT, 0); 1078 stream_mgr_post_msg(STREAM_QUIT, 0);
1079 rb->thread_wait(stream_mgr.thread); 1079 rb->thread_wait(stream_mgr.thread);
1080 stream_mgr.thread = NULL; 1080 stream_mgr.thread = 0;
1081 } 1081 }
1082 1082
1083#ifndef HAVE_LCD_COLOR 1083#ifndef HAVE_LCD_COLOR