From a4f23d63ab6a4de96611db504ea2f99ec3f2f4e9 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 29 Nov 2007 20:35:33 +0000 Subject: [PATCH] - Update png2theora to latest svn version (bz 400911) --- libtheora-1.0beta2-png2theora.patch | 70 +++++++++++++++++++++++++++++ libtheora.spec | 7 ++- 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 libtheora-1.0beta2-png2theora.patch diff --git a/libtheora-1.0beta2-png2theora.patch b/libtheora-1.0beta2-png2theora.patch new file mode 100644 index 0000000..2df1d98 --- /dev/null +++ b/libtheora-1.0beta2-png2theora.patch @@ -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); + diff --git a/libtheora.spec b/libtheora.spec index cd31420..e148763 100644 --- a/libtheora.spec +++ b/libtheora.spec @@ -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 1.0beta2-3 +- Update png2theora to latest svn version (bz 400911) + * Wed Oct 24 2007 Hans de Goede 1.0beta2-2 - Put Obsoletes/Provides theora-exp-devel in the -devel package instead of in the -tools package (oops)