From 9cac68709a5bc3d01564fa58ee1afc8bc886205c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 12 Feb 2014 12:39:10 +0100 Subject: [PATCH] souphttpsrc: Retry connection if we're finished before the content size only if we actually have a content size https://bugzilla.gnome.org/show_bug.cgi?id=722185 --- ext/soup/gstsouphttpsrc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c index b5fa7d8..b3ea9b8 100644 --- a/ext/soup/gstsouphttpsrc.c +++ b/ext/soup/gstsouphttpsrc.c @@ -962,7 +962,7 @@ gst_soup_http_src_finished_cb (SoupMessage * msg, GstSoupHTTPSrc * src) * was complete. Do nothing */ } else if (src->session_io_status == GST_SOUP_HTTP_SRC_SESSION_IO_STATUS_RUNNING && src->read_position > 0 && - (!src->have_size || src->read_position < src->content_size)) { + (src->have_size && src->read_position < src->content_size)) { /* The server disconnected while streaming. Reconnect and seeking to the * last location. */ src->retry = TRUE; @@ -1127,7 +1127,8 @@ gst_soup_http_src_response_cb (SoupSession * session, SoupMessage * msg, GST_DEBUG_OBJECT (src, "got response %d: %s", msg->status_code, msg->reason_phrase); if (src->session_io_status == GST_SOUP_HTTP_SRC_SESSION_IO_STATUS_RUNNING && - src->read_position > 0) { + src->read_position > 0 && (src->have_size + && src->read_position < src->content_size)) { /* The server disconnected while streaming. Reconnect and seeking to the * last location. */ src->retry = TRUE; -- 2.7.4