From: Michael Olbrich Date: Thu, 19 Apr 2018 11:57:26 +0000 (+0200) Subject: souphttpsrc: don't fail when seeking past the end of the content X-Git-Tag: 1.19.3~509^2~494 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=83beb9211bb9c475998d6e2a6ce8fb339d63f109;p=platform%2Fupstream%2Fgstreamer.git souphttpsrc: don't fail when seeking past the end of the content Range errors are already turned into EOS when the size is not known. Do the same thing if the request as outside the known content size. This can be triggered by seeking in a queue2: - Ensure that the range containing the end of the file is available. - Seek into this range from a different range. - queue2 creates a seek event with start= - this results in a "Requested Range Not Satisfiable" error Fixes #452 Part-of: --- diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c index 6547291..a899222 100644 --- a/ext/soup/gstsouphttpsrc.c +++ b/ext/soup/gstsouphttpsrc.c @@ -1417,7 +1417,8 @@ gst_soup_http_src_parse_status (SoupMessage * msg, GstSoupHTTPSrc * src) * a body message, requests that go beyond the content limits will result * in an error. Here we convert those to EOS */ if (msg->status_code == SOUP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE && - src->have_body && !src->have_size) { + src->have_body && (!src->have_size || + (src->request_position >= src->content_size))) { GST_DEBUG_OBJECT (src, "Requested range out of limits and received full " "body, returning EOS"); return GST_FLOW_EOS;