[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.
This commit is contained in:
parent
3e9f8effa0
commit
2f3ec36c6a
|
@ -123,9 +123,12 @@ seek(struct input_source *source, int seek_ms)
|
||||||
static int
|
static int
|
||||||
seek_http(struct input_source *source, int seek_ms)
|
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)
|
if (source->len_ms == 0)
|
||||||
return -1;
|
return 0;
|
||||||
|
|
||||||
return transcode_seek(source->input_ctx, seek_ms);
|
return transcode_seek(source->input_ctx, seek_ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue