rpms/libvorbis/devel libvorbis-1.2.2-svn16228.patch, NONE, 1.1 libvorbis.spec, 1.36, 1.37
Adam Jackson
ajax at fedoraproject.org
Wed Jul 8 19:13:47 UTC 2009
- Previous message (by thread): rpms/smolt/EL-5 smolt.spec,1.36,1.37 sources,1.22,1.23
- Next message (by thread): rpms/bugzilla/devel .cvsignore, 1.11, 1.12 bugzilla.spec, 1.25, 1.26 import.log, 1.3, 1.4 sources, 1.11, 1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ajax
Update of /cvs/pkgs/rpms/libvorbis/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1584
Modified Files:
libvorbis.spec
Added Files:
libvorbis-1.2.2-svn16228.patch
Log Message:
* Wed Jul 08 2009 Adam Jackson <ajax at redhat.com> 1.2.2-2
- libvorbis-1.2.2-svn16228.patch: Backport a fix from pre-1.2.3 to hopefully
fix small sound file playback. (#505610)
libvorbis-1.2.2-svn16228.patch:
--- NEW FILE libvorbis-1.2.2-svn16228.patch ---
diff -up libvorbis-1.2.2/lib/vorbisfile.c.jx libvorbis-1.2.2/lib/vorbisfile.c
--- libvorbis-1.2.2/lib/vorbisfile.c.jx 2009-06-04 01:06:07.000000000 -0400
+++ libvorbis-1.2.2/lib/vorbisfile.c 2009-07-08 15:04:58.000000000 -0400
@@ -675,8 +675,13 @@ static int _fetch_and_process_packet(Ogg
/* extract packets from page */
while(1){
- /* process a packet if we can. If the machine isn't loaded,
- neither is a page */
+ if(vf->ready_state==STREAMSET){
+ int ret=_make_decode_ready(vf);
+ if(ret<0)return ret;
+ }
+
+ /* process a packet if we can. */
+
if(vf->ready_state==INITSET){
while(1) {
ogg_packet op;
@@ -844,11 +849,6 @@ static int _fetch_and_process_packet(Ogg
link=0;
}
}
-
- {
- int ret=_make_decode_ready(vf);
- if(ret<0)return ret;
- }
}
/* the buffered page is the data we want, and we're ready for it;
@@ -1255,7 +1255,9 @@ int ov_raw_seek(OggVorbis_File *vf,ogg_i
int lastblock=0;
int accblock=0;
int thisblock=0;
- int eosflag=0;
+ int lastflag=0;
+ int firstflag=0;
+ ogg_int64_t pagepos=-1;
ogg_stream_init(&work_os,vf->current_serialno); /* get the memory ready */
ogg_stream_reset(&work_os); /* eliminate the spurious OV_HOLE
@@ -1276,7 +1278,14 @@ int ov_raw_seek(OggVorbis_File *vf,ogg_i
thisblock=0;
}else{
- if(eosflag)
+ /* We can't get a guaranteed correct pcm position out of the
+ last page in a stream because it might have a 'short'
+ granpos, which can only be detected in the presence of a
+ preceeding page. However, if the last page is also the first
+ page, the granpos rules of a first page take precedence. Not
+ only that, but for first==last, the EOS page must be treated
+ as if its a normal first page for the stream to open/play. */
+ if(lastflag && !firstflag)
ogg_stream_packetout(&vf->os,NULL);
else
if(lastblock)accblock+=(lastblock+thisblock)>>2;
@@ -1290,6 +1299,7 @@ int ov_raw_seek(OggVorbis_File *vf,ogg_i
for(i=0;i<link;i++)
granulepos+=vf->pcmlengths[i*2+1];
vf->pcm_offset=granulepos-accblock;
+ if(vf->pcm_offset<0)vf->pcm_offset=0;
break;
}
lastblock=thisblock;
@@ -1300,7 +1310,8 @@ int ov_raw_seek(OggVorbis_File *vf,ogg_i
}
if(!lastblock){
- if(_get_next_page(vf,&og,-1)<0){
+ pagepos=_get_next_page(vf,&og,-1);
+ if(pagepos<0){
vf->pcm_offset=ov_pcm_total(vf,-1);
break;
}
@@ -1341,12 +1352,13 @@ int ov_raw_seek(OggVorbis_File *vf,ogg_i
ogg_stream_reset_serialno(&vf->os,serialno);
ogg_stream_reset_serialno(&work_os,serialno);
vf->ready_state=STREAMSET;
-
+ firstflag=(pagepos<=vf->dataoffsets[link]);
}
ogg_stream_pagein(&vf->os,&og);
ogg_stream_pagein(&work_os,&og);
- eosflag=ogg_page_eos(&og);
+ lastflag=ogg_page_eos(&og);
+
}
}
Index: libvorbis.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libvorbis/devel/libvorbis.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -p -r1.36 -r1.37
--- libvorbis.spec 2 Jul 2009 17:02:52 -0000 1.36
+++ libvorbis.spec 8 Jul 2009 19:13:16 -0000 1.37
@@ -1,7 +1,7 @@
Summary: The Vorbis General Audio Compression Codec.
Name: libvorbis
Version: 1.2.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Epoch: 1
Group: System Environment/Libraries
License: BSD
@@ -10,6 +10,8 @@ Source: http://downloads.xiph.org/relea
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libogg-devel >= 2:1.1
+Patch0: libvorbis-1.2.2-svn16228.patch
+
%description
Ogg Vorbis is a fully open, non-proprietary, patent- and royalty-free,
general-purpose compressed audio format for audio and music at fixed
@@ -40,6 +42,7 @@ Documentation for developing application
%prep
%setup -q
+%patch0 -p1 -b .svn
sed -i "s/-O20/$RPM_OPT_FLAGS/" configure
sed -i "s/-ffast-math//" configure
@@ -82,6 +85,10 @@ rm -rf $RPM_BUILD_ROOT
%postun -p /sbin/ldconfig
%changelog
+* Wed Jul 08 2009 Adam Jackson <ajax at redhat.com> 1.2.2-2
+- libvorbis-1.2.2-svn16228.patch: Backport a fix from pre-1.2.3 to hopefully
+ fix small sound file playback. (#505610)
+
* Thu Jul 02 2009 Adam Jackson <ajax at redhat.com> 1.2.2-1
- libvorbis 1.2.2
- Previous message (by thread): rpms/smolt/EL-5 smolt.spec,1.36,1.37 sources,1.22,1.23
- Next message (by thread): rpms/bugzilla/devel .cvsignore, 1.11, 1.12 bugzilla.spec, 1.25, 1.26 import.log, 1.3, 1.4 sources, 1.11, 1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list