summaryrefslogtreecommitdiffstats
path: root/ext/soup
diff options
context:
space:
mode:
authorWouter Cloetens <wouter@mind.be>2008-01-19 14:34:50 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-01-19 14:34:50 +0000
commitec7388ffa35029c84bbfb31b52abdfc27e7758f8 (patch)
tree7216831e5bc3764b915df9fb87b339c9fecf50fd /ext/soup
parente7c9faaeaef756df31ec353d15d2525c9323d194 (diff)
downloadgst-plugins-bad-ec7388ffa35029c84bbfb31b52abdfc27e7758f8.tar.gz
gst-plugins-bad-ec7388ffa35029c84bbfb31b52abdfc27e7758f8.tar.bz2
gst-plugins-bad-ec7388ffa35029c84bbfb31b52abdfc27e7758f8.zip
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 <wouter at mind dot be> * ext/soup/gstsouphttpsrc.c: (soup_got_headers): Correctly set duration on the GstBaseSrc segment when we know it to fix failing the duration query.
Diffstat (limited to 'ext/soup')
-rw-r--r--ext/soup/gstsouphttpsrc.c4
1 files changed, 4 insertions, 0 deletions
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));