From 2f3ec36c6a7e7e6d4d78c7430f3d17ee8f71a464 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Fri, 12 Jul 2019 19:15:31 +0200 Subject: [PATCH] [input] Fix for playback pause on http streams This fixes a bug from commit 37ce8dd6 where seek_http (which is called when pausing playback) for non-seekable streams would return -1, thus signalling an error, even though it is not. The player would think that the stream could not be played and then skip to the next item. --- src/inputs/file_http.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/inputs/file_http.c b/src/inputs/file_http.c index ca570ecb..9d6d8a38 100644 --- a/src/inputs/file_http.c +++ b/src/inputs/file_http.c @@ -123,9 +123,12 @@ seek(struct input_source *source, int seek_ms) static int seek_http(struct input_source *source, int seek_ms) { - // stream is live/unknown length so obvs can't seek + // Stream is live/unknown length so can't seek. We return 0 anyway, because + // it is valid for the input to request a seek, since the input is not + // supposed to concern itself about this. if (source->len_ms == 0) - return -1; + return 0; + return transcode_seek(source->input_ctx, seek_ms); }