From db98ec9913862f58427d65455afb0dcb14633c4e Mon Sep 17 00:00:00 2001 From: maroy Date: Wed, 29 Jun 2005 12:45:50 +0000 Subject: [PATCH] added adder duration fix --- .../gstreamer/gstreamer-0.8.10/bin/install.sh | 4 ++- .../etc/adder-duration-fix.patch | 29 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 livesupport/tools/gstreamer/gstreamer-0.8.10/etc/adder-duration-fix.patch diff --git a/livesupport/tools/gstreamer/gstreamer-0.8.10/bin/install.sh b/livesupport/tools/gstreamer/gstreamer-0.8.10/bin/install.sh index d5f13213e..5fe3814a0 100755 --- a/livesupport/tools/gstreamer/gstreamer-0.8.10/bin/install.sh +++ b/livesupport/tools/gstreamer/gstreamer-0.8.10/bin/install.sh @@ -22,7 +22,7 @@ # # # Author : $Author: maroy $ -# Version : $Revision: 1.5 $ +# Version : $Revision: 1.6 $ # Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/tools/gstreamer/gstreamer-0.8.10/bin/Attic/install.sh,v $ #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- @@ -65,6 +65,8 @@ cd ${plugins} # see bug report at http://bugzilla.gnome.org/show_bug.cgi?id=305658 # for details on the following patch patch -p1 < ${etcdir}/adder-fix.diff +# TODO: file a bug report with this patch +patch -p1 < ${etcdir}/adder-duration-fix.patch # see bug report at http://bugzilla.gnome.org/show_bug.cgi?id=308167 # for details on the following patch patch -p1 < ${etcdir}/switch-fix.diff diff --git a/livesupport/tools/gstreamer/gstreamer-0.8.10/etc/adder-duration-fix.patch b/livesupport/tools/gstreamer/gstreamer-0.8.10/etc/adder-duration-fix.patch new file mode 100644 index 000000000..5ec07ede9 --- /dev/null +++ b/livesupport/tools/gstreamer/gstreamer-0.8.10/etc/adder-duration-fix.patch @@ -0,0 +1,29 @@ +--- gst-plugins-0.8.9/gst/adder/gstadder.c 2005-06-29 14:45:17.000000000 +0200 ++++ gst-plugins-0.8.9-livesupport/gst/adder/gstadder.c 2005-06-29 14:42:05.000000000 +0200 +@@ -558,14 +558,19 @@ + } + + if (valid_inputs > 0 || adder->eos == FALSE) { ++ gint64 delta; ++ gint64 duration; ++ ++ delta = (adder->format == GST_ADDER_FORMAT_FLOAT) ++ ? GST_BUFFER_SIZE (buf_out) / adder->width / adder->channels ++ : GST_BUFFER_SIZE (buf_out) * 8 / adder->width / adder->channels; ++ duration = delta * GST_SECOND / adder->rate; ++ + GST_BUFFER_TIMESTAMP (buf_out) = adder->timestamp; +- if (adder->format == GST_ADDER_FORMAT_FLOAT) +- adder->offset += +- GST_BUFFER_SIZE (buf_out) / adder->width / adder->channels; +- else +- adder->offset += +- GST_BUFFER_SIZE (buf_out) * 8 / adder->width / adder->channels; +- adder->timestamp = adder->offset * GST_SECOND / adder->rate; ++ GST_BUFFER_DURATION (buf_out) = duration; ++ ++ adder->offset += delta; ++ adder->timestamp += duration; + + /* send it out */ + GST_LOG ("pushing buf_out");