commit 3c9eb1206e79b10ed64a65051e830d6f6fb09e8f
Author: Bastien Nocera <hadess(a)fedoraproject.org>
Date: Thu Oct 18 15:16:15 2007 +0000
- Add patch to fix playback of short Ogg Vorbis files (#328851)
gstreamer-plugins-base-0.10.14-short-ogg-fix.patch | 105 +++++++++++++++++++++
gstreamer-plugins-base.spec | 8 +-
2 files changed, 112 insertions(+), 1 deletion(-)
---
diff --git a/gstreamer-plugins-base-0.10.14-short-ogg-fix.patch
b/gstreamer-plugins-base-0.10.14-short-ogg-fix.patch
new file mode 100644
index 0000000..b377cac
--- /dev/null
+++ b/gstreamer-plugins-base-0.10.14-short-ogg-fix.patch
@@ -0,0 +1,105 @@
+--- ext/ogg/gstoggdemux.c 2007/06/23 14:44:07 1.180
++++ ext/ogg/gstoggdemux.c 2007/08/21 11:42:39 1.181
+@@ -2396,6 +2396,10 @@
+ if (pad->serialno == serial) {
+ known_serial = TRUE;
+
++ /* submit the page now, this will fill in the start_time when the
++ * internal decoder finds it */
++ gst_ogg_pad_submit_page (pad, &op);
++
+ if (!pad->is_skeleton && pad->start_time == -1 &&
ogg_page_eos (&op)) {
+ /* got EOS on a pad before we could find its start_time.
+ * We have no chance of finding a start_time for every pad so
+@@ -2404,11 +2408,11 @@
+ done = TRUE;
+ break;
+ }
+- gst_ogg_pad_submit_page (pad, &op);
+ }
+ /* the timestamp will be filled in when we submit the pages */
+ if (!pad->is_skeleton)
+ done &= (pad->start_time != GST_CLOCK_TIME_NONE);
++
+ GST_LOG_OBJECT (ogg, "done %08x now %d", pad->serialno, done);
+ }
+
+@@ -2577,7 +2581,7 @@
+ gboolean res = TRUE;
+
+ chain->total_time = GST_CLOCK_TIME_NONE;
+- chain->segment_start = G_MAXINT64;
++ chain->segment_start = G_MAXUINT64;
+
+ GST_DEBUG_OBJECT (ogg, "trying to collect chain info");
+
+@@ -2595,7 +2599,7 @@
+ }
+
+ if (chain->segment_stop != GST_CLOCK_TIME_NONE
+- && chain->segment_start != G_MAXINT64)
++ && chain->segment_start != G_MAXUINT64)
+ chain->total_time = chain->segment_stop - chain->segment_start;
+
+ GST_DEBUG_OBJECT (ogg, "return %d", res);
+--- ext/vorbis/vorbisdec.c 2007/07/26 10:00:37 1.127
++++ ext/vorbis/vorbisdec.c 2007/08/21 12:08:43 1.128
+@@ -806,7 +806,12 @@
+ vorbis_dec_push_forward (GstVorbisDec * dec, GstBuffer * buf)
+ {
+ GstFlowReturn result;
+- gint64 outoffset = GST_BUFFER_OFFSET (buf);
++ gint64 outoffset, origoffset;
++
++ origoffset = GST_BUFFER_OFFSET (buf);
++
++again:
++ outoffset = origoffset;
+
+ if (outoffset == -1) {
+ dec->queued = g_list_append (dec->queued, buf);
+@@ -814,7 +819,7 @@
+ result = GST_FLOW_OK;
+ } else {
+ if (G_UNLIKELY (dec->queued)) {
+- gint64 size;
++ guint size;
+ GstClockTime ts;
+ GList *walk;
+
+@@ -827,9 +832,20 @@
+ for (walk = g_list_last (dec->queued); walk;
+ walk = g_list_previous (walk)) {
+ GstBuffer *buffer = GST_BUFFER (walk->data);
++ guint offset;
+
+- outoffset -=
+- GST_BUFFER_SIZE (buffer) / (sizeof (float) * dec->vi.channels);
++ offset = GST_BUFFER_SIZE (buffer) / (sizeof (float) * dec->vi.channels);
++
++ if (outoffset >= offset)
++ outoffset -= offset;
++ else {
++ /* we can't go below 0, this means this first offset was at the eos
++ * page and we need to clip to it instead */
++ GST_DEBUG_OBJECT (dec, "clipping %" G_GINT64_FORMAT,
++ offset - outoffset);
++ origoffset += (offset - outoffset);
++ goto again;
++ }
+
+ GST_BUFFER_OFFSET (buffer) = outoffset;
+ GST_BUFFER_TIMESTAMP (buffer) =
+@@ -837,9 +853,9 @@
+ GST_BUFFER_DURATION (buffer) = GST_CLOCK_DIFF (GST_BUFFER_TIMESTAMP
+ (buffer), ts);
+ ts = GST_BUFFER_TIMESTAMP (buffer);
+- GST_DEBUG_OBJECT (dec, "patch buffer %" G_GUINT64_FORMAT
+- ", offset %" G_GUINT64_FORMAT ", timestamp %"
GST_TIME_FORMAT
+- ", duration %" GST_TIME_FORMAT, size, outoffset,
++ GST_DEBUG_OBJECT (dec, "patch buffer %u, offset %" G_GUINT64_FORMAT
++ ", timestamp %" GST_TIME_FORMAT ", duration %"
GST_TIME_FORMAT,
++ size, outoffset,
+ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)),
+ GST_TIME_ARGS (GST_BUFFER_DURATION (buffer)));
+ size--;
diff --git a/gstreamer-plugins-base.spec b/gstreamer-plugins-base.spec
index 9c36e57..49ca8d9 100644
--- a/gstreamer-plugins-base.spec
+++ b/gstreamer-plugins-base.spec
@@ -5,7 +5,7 @@
Name: %{gstreamer}-plugins-base
Version: 0.10.14
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: GStreamer streaming media framework base plug-ins
Group: Applications/Multimedia
@@ -13,6 +13,8 @@ License: LGPL
URL:
http://gstreamer.freedesktop.org/
Source:
http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-%{...
Patch0: gstreamer-plugins-base-0.10.14-unsupported-codec.patch
+#
https://bugzilla.redhat.com/show_bug.cgi?id=328851
+Patch1: gstreamer-plugins-base-0.10.14-short-ogg-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: %{gstreamer} >= %{_gst}
@@ -54,6 +56,7 @@ This package contains a set of well-maintained base plug-ins.
pushd gst/playback/
%patch0 -p0
popd
+%patch1 -p0
%build
%configure \
@@ -239,6 +242,9 @@ GStreamer Base Plugins library development and header files.
%doc %{_datadir}/gtk-doc/html/gst-plugins-base-plugins-%{majorminor}
%changelog
+* Thu Oct 18 2007 - Bastien Nocera <bnocera(a)redhat.com> - 0.10.14-6
+- Add patch to fix playback of short Ogg Vorbis files (#328851)
+
* Wed Aug 29 2007 - Bastien Nocera <bnocera(a)redhat.com> - 0.10.14-5
- Add patch to avoid critical warning when getting information about
missing codecs