rpms/gstreamer-plugins-base/devel gstreamer-plugins-base-0.10.14-short-ogg-fix.patch, NONE, 1.1 gstreamer-plugins-base.spec, 1.34, 1.35
Bastien Nocera (hadess)
fedora-extras-commits at redhat.com
Thu Oct 18 15:16:48 UTC 2007
Author: hadess
Update of /cvs/pkgs/rpms/gstreamer-plugins-base/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1707
Modified Files:
gstreamer-plugins-base.spec
Added Files:
gstreamer-plugins-base-0.10.14-short-ogg-fix.patch
Log Message:
* Thu Oct 18 2007 - Bastien Nocera <bnocera at redhat.com> - 0.10.14-6
- Add patch to fix playback of short Ogg Vorbis files (#328851)
gstreamer-plugins-base-0.10.14-short-ogg-fix.patch:
--- NEW FILE gstreamer-plugins-base-0.10.14-short-ogg-fix.patch ---
--- 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--;
Index: gstreamer-plugins-base.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gstreamer-plugins-base/devel/gstreamer-plugins-base.spec,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- gstreamer-plugins-base.spec 29 Aug 2007 13:03:09 -0000 1.34
+++ gstreamer-plugins-base.spec 18 Oct 2007 15:16:15 -0000 1.35
@@ -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 @@
URL: http://gstreamer.freedesktop.org/
Source: http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-%{version}.tar.bz2
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 @@
pushd gst/playback/
%patch0 -p0
popd
+%patch1 -p0
%build
%configure \
@@ -239,6 +242,9 @@
%doc %{_datadir}/gtk-doc/html/gst-plugins-base-plugins-%{majorminor}
%changelog
+* Thu Oct 18 2007 - Bastien Nocera <bnocera at redhat.com> - 0.10.14-6
+- Add patch to fix playback of short Ogg Vorbis files (#328851)
+
* Wed Aug 29 2007 - Bastien Nocera <bnocera at redhat.com> - 0.10.14-5
- Add patch to avoid critical warning when getting information about
missing codecs
More information about the fedora-extras-commits
mailing list