Revert "[player] Do not abort if pausing a stream or pipe playback"

This reverts commit fd84dd51b5.
This commit is contained in:
ejurgensen 2018-12-03 23:59:31 +01:00
parent bb1347f2c0
commit 4f6c9bb366
1 changed files with 3 additions and 17 deletions

View File

@ -2003,19 +2003,6 @@ playback_start_item(void *arg, int *retval)
// Resume playback of current source // Resume playback of current source
ps = source_now_playing(); ps = source_now_playing();
DPRINTF(E_DBG, L_PLAYER, "Resume playback of '%s' (id=%d, item-id=%d)\n", ps->path, ps->id, ps->item_id); DPRINTF(E_DBG, L_PLAYER, "Resume playback of '%s' (id=%d, item-id=%d)\n", ps->path, ps->id, ps->item_id);
// Check if source needs to be reopend
if (!ps->setup_done)
{
DPRINTF(E_INFO, L_PLAYER, "Opening '%s'\n", ps->path);
ret = input_setup(ps);
if (ret < 0)
{
DPRINTF(E_LOG, L_PLAYER, "Failed to open '%s'\n", ps->path);
return -1;
}
}
} }
else else
{ {
@ -2343,11 +2330,10 @@ playback_pause_bh(void *arg, int *retval)
if (cur_streaming->data_kind == DATA_KIND_HTTP || cur_streaming->data_kind == DATA_KIND_PIPE) if (cur_streaming->data_kind == DATA_KIND_HTTP || cur_streaming->data_kind == DATA_KIND_PIPE)
{ {
// For stream and pipe input we stop reading from the source but still switch to the paused state. DPRINTF(E_DBG, L_PLAYER, "Source is not pausable, abort playback\n");
// (Resuming playback will reopen the source)
DPRINTF(E_DBG, L_PLAYER, "Source is not pausable, stop playback\n");
input_stop(cur_streaming); playback_abort();
return COMMAND_END;
} }
status_update(PLAY_PAUSED); status_update(PLAY_PAUSED);