- Update png2theora to latest svn version (bz 400911)
This commit is contained in:
parent
4569d6b5a2
commit
a4f23d63ab
70
libtheora-1.0beta2-png2theora.patch
Normal file
70
libtheora-1.0beta2-png2theora.patch
Normal file
@ -0,0 +1,70 @@
|
||||
--- libtheora-1.0beta2/examples/png2theora.c 2007-10-04 20:37:00.000000000 +0200
|
||||
+++ libtheora-1.0beta2/examples/png2theora.c.new 2007-11-29 21:30:56.000000000 +0100
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
function: example encoder application; makes an Ogg Theora
|
||||
file from a sequence of png images
|
||||
- last mod: $Id: png2theora.c 13925 2007-10-03 18:51:06Z sping $
|
||||
+ last mod: $Id$
|
||||
based on code from Vegard Nossum
|
||||
|
||||
********************************************************************/
|
||||
@@ -132,22 +132,24 @@
|
||||
fwrite(og.header, og.header_len, 1, ogg_fp);
|
||||
fwrite(og.body, og.body_len, 1, ogg_fp);
|
||||
}
|
||||
+ /* libogg flushes automatically after the first header */
|
||||
|
||||
theora_comment_init(&tc);
|
||||
theora_encode_comment(&tc, &op);
|
||||
ogg_stream_packetin(&ogg_os, &op);
|
||||
- if(ogg_stream_pageout(&ogg_os, &og)) {
|
||||
+ while(ogg_stream_pageout(&ogg_os, &og)) {
|
||||
fwrite(og.header, og.header_len, 1, ogg_fp);
|
||||
fwrite(og.body, og.body_len, 1, ogg_fp);
|
||||
}
|
||||
|
||||
theora_encode_tables(&theora_td, &op);
|
||||
ogg_stream_packetin(&ogg_os, &op);
|
||||
- if(ogg_stream_pageout(&ogg_os, &og)) {
|
||||
+ while(ogg_stream_pageout(&ogg_os, &og)) {
|
||||
fwrite(og.header, og.header_len, 1, ogg_fp);
|
||||
fwrite(og.body, og.body_len, 1, ogg_fp);
|
||||
}
|
||||
|
||||
+ /* flush at the end of the headers */
|
||||
if(ogg_stream_flush(&ogg_os, &og)) {
|
||||
fwrite(og.header, og.header_len, 1, ogg_fp);
|
||||
fwrite(og.body, og.body_len, 1, ogg_fp);
|
||||
@@ -234,7 +236,7 @@
|
||||
}
|
||||
|
||||
ogg_stream_packetin(&ogg_os, &op);
|
||||
- if(ogg_stream_pageout(&ogg_os, &og)) {
|
||||
+ while(ogg_stream_pageout(&ogg_os, &og)) {
|
||||
fwrite(og.header, og.header_len, 1, ogg_fp);
|
||||
fwrite(og.body, og.body_len, 1, ogg_fp);
|
||||
}
|
||||
@@ -254,7 +256,11 @@
|
||||
|
||||
if (theora_initialized) {
|
||||
theora_encode_packetout(&theora_td, 1, &op);
|
||||
- if(ogg_stream_pageout(&ogg_os, &og)) {
|
||||
+ while(ogg_stream_pageout(&ogg_os, &og)) {
|
||||
+ fwrite(og.header, og.header_len, 1, ogg_fp);
|
||||
+ fwrite(og.body, og.body_len, 1, ogg_fp);
|
||||
+ }
|
||||
+ if(ogg_stream_flush(&ogg_os, &og)) {
|
||||
fwrite(og.header, og.header_len, 1, ogg_fp);
|
||||
fwrite(og.body, og.body_len, 1, ogg_fp);
|
||||
}
|
||||
@@ -369,7 +375,8 @@
|
||||
png_init_io(png_ptr, fp);
|
||||
png_set_sig_bytes(png_ptr, 8);
|
||||
|
||||
- png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_STRIP_16, NULL);
|
||||
+ png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_STRIP_16 |
|
||||
+ PNG_TRANSFORM_STRIP_ALPHA | PNG_TRANSFORM_PACKING, NULL);
|
||||
|
||||
row_pointers = png_get_rows(png_ptr, info_ptr);
|
||||
|
@ -1,13 +1,14 @@
|
||||
Summary: Theora Video Compression Codec
|
||||
Name: libtheora
|
||||
Version: 1.0beta2
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Epoch: 0
|
||||
License: BSD
|
||||
Group: System Environment/Libraries
|
||||
URL: http://www.theora.org
|
||||
Source0: http://downloads.xiph.org/releases/theora/%{name}-%{version}.tar.gz
|
||||
Patch1: libtheora-1.0alpha8-textreloc.patch
|
||||
Patch2: libtheora-1.0beta2-png2theora.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: libogg-devel >= 2:1.1
|
||||
BuildRequires: libvorbis-devel
|
||||
@ -55,6 +56,7 @@ with theora bitstreams.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
|
||||
%build
|
||||
@ -105,6 +107,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Nov 29 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0beta2-3
|
||||
- Update png2theora to latest svn version (bz 400911)
|
||||
|
||||
* Wed Oct 24 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.0beta2-2
|
||||
- Put Obsoletes/Provides theora-exp-devel in the -devel package instead of in
|
||||
the -tools package (oops)
|
||||
|
Loading…
Reference in New Issue
Block a user