diff options
Diffstat (limited to 'firmware/target/hosted/maemo')
-rw-r--r-- | firmware/target/hosted/maemo/pcm-gstreamer.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/firmware/target/hosted/maemo/pcm-gstreamer.c b/firmware/target/hosted/maemo/pcm-gstreamer.c index 61f33cbadd..10a9d77880 100644 --- a/firmware/target/hosted/maemo/pcm-gstreamer.c +++ b/firmware/target/hosted/maemo/pcm-gstreamer.c | |||
@@ -90,7 +90,7 @@ GstBus *gst_bus = NULL; | |||
90 | static int bus_watch_id = 0; | 90 | static int bus_watch_id = 0; |
91 | GMainLoop *pcm_loop = NULL; | 91 | GMainLoop *pcm_loop = NULL; |
92 | 92 | ||
93 | static __u8* pcm_data = NULL; | 93 | static const void* pcm_data = NULL; |
94 | static size_t pcm_data_size = 0; | 94 | static size_t pcm_data_size = 0; |
95 | 95 | ||
96 | static int audio_locked = 0; | 96 | static int audio_locked = 0; |
@@ -128,7 +128,7 @@ void pcm_dma_apply_settings(void) | |||
128 | 128 | ||
129 | void pcm_play_dma_start(const void *addr, size_t size) | 129 | void pcm_play_dma_start(const void *addr, size_t size) |
130 | { | 130 | { |
131 | pcm_data = (__u8 *) addr; | 131 | pcm_data = addr; |
132 | pcm_data_size = size; | 132 | pcm_data_size = size; |
133 | 133 | ||
134 | if (playback_granted) | 134 | if (playback_granted) |
@@ -189,13 +189,12 @@ static void feed_data(GstElement * appsrc, guint size_hint, void *unused) | |||
189 | from inside gstreamer's stream thread as it will deadlock */ | 189 | from inside gstreamer's stream thread as it will deadlock */ |
190 | inside_feed_data = 1; | 190 | inside_feed_data = 1; |
191 | 191 | ||
192 | if (pcm_play_dma_complete_callback(PCM_DMAST_OK, (const void **)&pcm_data, | 192 | if (pcm_play_dma_complete_callback(PCM_DMAST_OK, &pcm_data, &pcm_data_size)) |
193 | &pcm_data_size)) | ||
194 | { | 193 | { |
195 | GstBuffer *buffer = gst_buffer_new (); | 194 | GstBuffer *buffer = gst_buffer_new (); |
196 | GstFlowReturn ret; | 195 | GstFlowReturn ret; |
197 | 196 | ||
198 | GST_BUFFER_DATA (buffer) = pcm_data; | 197 | GST_BUFFER_DATA (buffer) = (__u8 *)pcm_data; |
199 | GST_BUFFER_SIZE (buffer) = pcm_data_size; | 198 | GST_BUFFER_SIZE (buffer) = pcm_data_size; |
200 | 199 | ||
201 | g_signal_emit_by_name (appsrc, "push-buffer", buffer, &ret); | 200 | g_signal_emit_by_name (appsrc, "push-buffer", buffer, &ret); |