From 505878c02260a9afea804bd9a8c3e757a8856570 Mon Sep 17 00:00:00 2001 From: Wouter Cloetens Date: Sat, 19 Jan 2008 14:34:50 +0000 Subject: ext/soup/gstsouphttpsrc.c: Correctly set duration on the GstBaseSrc segment when we know it to fix failing the durati... Original commit message from CVS: Patch by: Wouter Cloetens * ext/soup/gstsouphttpsrc.c: (soup_got_headers): Correctly set duration on the GstBaseSrc segment when we know it to fix failing the duration query. --- common | 2 +- ext/soup/gstsouphttpsrc.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/common b/common index 9aa2dcf8..b6bd1a35 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 9aa2dcf8d6855932e9e91006d6be96f55fd9f1a3 +Subproject commit b6bd1a35b641237d016496039e474dee4230de76 diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c index 064d4c5c..e3127e47 100644 --- a/ext/soup/gstsouphttpsrc.c +++ b/ext/soup/gstsouphttpsrc.c @@ -558,6 +558,7 @@ soup_got_headers (SoupMessage * msg, GstSouphttpSrc * src) { const char *value; GstTagList *tag_list; + GstBaseSrc *basesrc; GST_DEBUG_OBJECT (src, "got headers"); @@ -568,6 +569,9 @@ soup_got_headers (SoupMessage * msg, GstSouphttpSrc * src) src->have_size = TRUE; GST_DEBUG_OBJECT (src, "size = %llu", src->content_size); + basesrc = GST_BASE_SRC_CAST (src); + gst_segment_set_duration (&basesrc->segment, GST_FORMAT_BYTES, + src->content_size); gst_element_post_message (GST_ELEMENT (src), gst_message_new_duration (GST_OBJECT (src), GST_FORMAT_BYTES, src->content_size)); -- cgit