From faaeb92ce535e5b13536928f013f61493337fc97 Mon Sep 17 00:00:00 2001 From: chme Date: Wed, 26 Oct 2016 20:09:09 +0200 Subject: [PATCH] [player] Reading media_file_info is not necessary in source_pause --- src/player.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/src/player.c b/src/player.c index 1ec16a58..8004c51b 100644 --- a/src/player.c +++ b/src/player.c @@ -1026,7 +1026,6 @@ source_pause(uint64_t pos) struct player_source *ps_playing; struct player_source *ps_playnext; struct player_source *ps_temp; - struct media_file_info *mfi; uint64_t seek_frames; int seek_ms; int ret; @@ -1070,33 +1069,14 @@ source_pause(uint64_t pos) if (!cur_streaming->setup_done) { - mfi = db_file_fetch_byid(cur_streaming->id); - if (!mfi) - { - DPRINTF(E_LOG, L_PLAYER, "Couldn't fetch file id %d\n", cur_streaming->id); - - return -1; - } - - if (mfi->disabled) - { - DPRINTF(E_DBG, L_PLAYER, "File id %d is disabled, skipping\n", cur_streaming->id); - - free_mfi(mfi, 0); - return -1; - } - - DPRINTF(E_INFO, L_PLAYER, "Opening '%s' (%s)\n", mfi->title, mfi->path); + DPRINTF(E_INFO, L_PLAYER, "Opening '%s'\n", cur_streaming->path); ret = stream_setup(cur_streaming, mfi); if (ret < 0) { - DPRINTF(E_LOG, L_PLAYER, "Failed to open '%s' (%s)\n", mfi->title, mfi->path); - free_mfi(mfi, 0); + DPRINTF(E_LOG, L_PLAYER, "Failed to open '%s'\n", cur_streaming->path); return -1; } - - free_mfi(mfi, 0); } /* Seek back to the pause position */