rpms/libtheora/devel libtheora-1.0beta2-png2theora.patch, NONE, 1.1 libtheora.spec, 1.22, 1.23
Hans de Goede (jwrdegoede)
fedora-extras-commits at redhat.com
Thu Nov 29 20:36:06 UTC 2007
Author: jwrdegoede
Update of /cvs/extras/rpms/libtheora/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13996
Modified Files:
libtheora.spec
Added Files:
libtheora-1.0beta2-png2theora.patch
Log Message:
* Thu Nov 29 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 1.0beta2-3
- Update png2theora to latest svn version (bz 400911)
libtheora-1.0beta2-png2theora.patch:
--- NEW FILE libtheora-1.0beta2-png2theora.patch ---
--- 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);
Index: libtheora.spec
===================================================================
RCS file: /cvs/extras/rpms/libtheora/devel/libtheora.spec,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- libtheora.spec 24 Oct 2007 08:36:49 -0000 1.22
+++ libtheora.spec 29 Nov 2007 20:35:33 -0000 1.23
@@ -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 @@
%prep
%setup -q
%patch1 -p1
+%patch2 -p1
%build
@@ -105,6 +107,9 @@
%changelog
+* Thu Nov 29 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 1.0beta2-3
+- Update png2theora to latest svn version (bz 400911)
+
* Wed Oct 24 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 1.0beta2-2
- Put Obsoletes/Provides theora-exp-devel in the -devel package instead of in
the -tools package (oops)
More information about the fedora-extras-commits
mailing list