aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/output/osx_output_plugin.c9
-rw-r--r--src/playlist_edit.c2
2 files changed, 4 insertions, 7 deletions
diff --git a/src/output/osx_output_plugin.c b/src/output/osx_output_plugin.c
index f07aedc08..93f784a48 100644
--- a/src/output/osx_output_plugin.c
+++ b/src/output/osx_output_plugin.c
@@ -152,7 +152,6 @@ osx_render(void *vdata,
g_mutex_lock(od->mutex);
bytes_to_copy = MIN(od->len, buffer_size);
- buffer_size = bytes_to_copy;
od->len -= bytes_to_copy;
trailer_length = od->buffer_size - od->pos;
@@ -174,11 +173,9 @@ osx_render(void *vdata,
g_cond_signal(od->condition);
g_mutex_unlock(od->mutex);
- buffer->mDataByteSize = buffer_size;
-
- if (!buffer_size) {
- g_usleep(1000);
- }
+ if (bytes_to_copy < buffer_size)
+ memset((unsigned char*)buffer->mData + bytes_to_copy, 0,
+ buffer_size - bytes_to_copy);
return 0;
}
diff --git a/src/playlist_edit.c b/src/playlist_edit.c
index 92c3d44b0..dbd205a06 100644
--- a/src/playlist_edit.c
+++ b/src/playlist_edit.c
@@ -418,7 +418,7 @@ playlist_move_range(struct playlist *playlist, struct player_control *pc,
playlist->current)
: -1;
if (to < 0 && playlist->current >= 0) {
- if (start <= (unsigned)currentSong && (unsigned)currentSong <= end)
+ if (start <= (unsigned)currentSong && (unsigned)currentSong < end)
/* no-op, can't be moved to offset of itself */
return PLAYLIST_RESULT_SUCCESS;
to = (currentSong + abs(to)) % queue_length(&playlist->queue);