From fd0c27056315260672137fe888df2426d6bf1f75 Mon Sep 17 00:00:00 2001 From: Eunhae Choi Date: Wed, 21 Dec 2016 13:50:34 +0900 Subject: [PATCH] souphttpsrc: fix svace issue Change-Id: Iacedc8aa02fb42a010e6713a332008fa89a58491 (cherry picked from commit eb0c48d090bee73bd317dd0b4fe6378fe4f559bd) --- ext/soup/gstsouphttpsrc.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c index 586c9f0..7a8fee5 100644 --- a/ext/soup/gstsouphttpsrc.c +++ b/ext/soup/gstsouphttpsrc.c @@ -837,26 +837,27 @@ gst_soup_http_src_add_range_header (GstSoupHTTPSrc * src, guint64 offset, gint rc; soup_message_headers_remove (src->msg->request_headers, "Range"); -#ifdef TIZEN_FEATURE_SOUP_MODIFICATION + /*[prasenjit.c]This changes are needed to enable Seekable Contents from server. We have observed that , for few specific networks ( VODAFONE ) , without theabove headers , Youtube is sending non-seekable contents to the Client. */ - if (stop_offset != -1) { -#else - if (offset || stop_offset != -1) { +#ifndef TIZEN_FEATURE_SOUP_MODIFICATION + if (offset || stop_offset != -1) #endif + { if (stop_offset != -1) { rc = g_snprintf (buf, sizeof (buf), "bytes=%" G_GUINT64_FORMAT "-%" - G_GUINT64_FORMAT, offset, stop_offset); + G_GUINT64_FORMAT, offset, stop_offset); } else { rc = g_snprintf (buf, sizeof (buf), "bytes=%" G_GUINT64_FORMAT "-", - offset); + offset); } if (rc > sizeof (buf) || rc < 0) return FALSE; soup_message_headers_append (src->msg->request_headers, "Range", buf); } + src->read_position = offset; return TRUE; } @@ -912,7 +913,7 @@ _append_extra_header (GQuark field_id, const GValue * value, gpointer user_data) if (src->cookie_jar) soup_cookie_jar_add_cookie (src->cookie_jar, cookie_parsed); - tmp_field = strtok (NULL, ";"); + tmp_field = strtok_r (NULL, ";", &saveptr); } soup_uri_free (uri); } -- 2.7.4