diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-07-07 11:13:19 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-07-07 11:13:19 +0200 |
commit | b171259612d7ca2b29a7445be03d7702b51ab9c5 (patch) | |
tree | 5edcf15eb6773a3909b8d42ba81dc24fd3497117 | |
parent | 806cf03fbcbce0046331e2e349003e22238ee1a3 (diff) | |
parent | 0993102834edd7172c7fc527646ae1f990786444 (diff) | |
download | gstreamer-b171259612d7ca2b29a7445be03d7702b51ab9c5.tar.gz |
Merge branch 'master' into 0.11
Conflicts:
libs/gst/base/gstbasesrc.c
m--------- | common | 0 | ||||
-rw-r--r-- | gst/gsttask.c | 2 | ||||
-rw-r--r-- | libs/gst/base/gstbasesrc.c | 9 |
3 files changed, 8 insertions, 3 deletions
diff --git a/common b/common -Subproject 69b981f10caa234ad0ff639179d0fda8505bd94 +Subproject 605cd9a65ed61505f24b840d3fe8e252be72b15 diff --git a/gst/gsttask.c b/gst/gsttask.c index fba8c385b5..961f816b4f 100644 --- a/gst/gsttask.c +++ b/gst/gsttask.c @@ -225,7 +225,7 @@ gst_task_finalize (GObject * object) static void gst_task_configure_name (GstTask * task) { -#ifdef HAVE_SYS_PRCTL_H +#if defined(HAVE_SYS_PRCTL_H) && defined(PR_SET_NAME) const gchar *name; gchar thread_name[17] = { 0, }; diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index ccd7bf29f9..c40ae940dc 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -2139,11 +2139,10 @@ gst_base_src_update_length (GstBaseSrc * src, guint64 offset, guint * length) } } - /* keep track of current position and update duration. + /* keep track of current duration. * segment is in bytes, we checked that above. */ GST_OBJECT_LOCK (src); src->segment.duration = size; - src->segment.position = offset; GST_OBJECT_UNLOCK (src); return TRUE; @@ -2184,6 +2183,12 @@ again: if (G_UNLIKELY (!gst_base_src_update_length (src, offset, &length))) goto unexpected_length; + /* track position */ + GST_OBJECT_LOCK (src); + if (src->segment.format == GST_FORMAT_BYTES) + gst_segment_set_last_stop (&src->segment, GST_FORMAT_BYTES, offset); + GST_OBJECT_UNLOCK (src); + /* normally we don't count buffers */ if (G_UNLIKELY (src->num_buffers_left >= 0)) { if (src->num_buffers_left == 0) |