Author: kwizart
Update of /cvs/free/rpms/ffmpeg2theora/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv28862/devel
Modified Files:
ffmpeg2theora.spec
Added Files:
ffmpeg2theora-backport.patch
Log Message:
Backport support for ffmpeg 2.0x
ffmpeg2theora-backport.patch:
ffmpeg2theora.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- NEW FILE ffmpeg2theora-backport.patch ---
commit d3435a6a83dc656379de9e6523ecf8d565da6ca6
Author: Jan Gerber <j(a)xiph.org>
Date: Sun May 26 15:25:42 2013 +0200
don't use deprecated AVCODEC_MAX_AUDIO_FRAME_SIZE
diff --git a/src/ffmpeg2theora.c b/src/ffmpeg2theora.c
index cde63b9..8bebf28 100644
--- a/src/ffmpeg2theora.c
+++ b/src/ffmpeg2theora.c
@@ -47,6 +47,9 @@
#include "ffmpeg2theora.h"
#include "avinfo.h"
+#define MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
+
+
#define LENGTH(x) (sizeof(x) / sizeof(*x))
enum {
@@ -1069,8 +1072,8 @@ void ff2theora_output(ff2theora this) {
int first = 1;
int audio_eos = 0, video_eos = 0, audio_done = 0, video_done = 0;
int ret;
- int16_t *audio_buf=av_malloc(4*AVCODEC_MAX_AUDIO_FRAME_SIZE);
- int16_t *resampled=av_malloc(4*AVCODEC_MAX_AUDIO_FRAME_SIZE);
+ int16_t *audio_buf=av_malloc(4*MAX_AUDIO_FRAME_SIZE);
+ int16_t *resampled=av_malloc(4*MAX_AUDIO_FRAME_SIZE);
int16_t *audio_p=NULL;
int no_frames;
int no_samples;
@@ -1531,7 +1534,7 @@ void ff2theora_output(ff2theora this) {
while((audio_eos && !audio_done) || avpkt.size > 0 ) {
int samples=0;
int samples_out=0;
- int data_size = 4*AVCODEC_MAX_AUDIO_FRAME_SIZE;
+ int data_size = 4*MAX_AUDIO_FRAME_SIZE;
int bytes_per_sample = av_get_bytes_per_sample(aenc->sample_fmt);
if (avpkt.size > 0) {
Index: ffmpeg2theora.spec
===================================================================
RCS file: /cvs/free/rpms/ffmpeg2theora/devel/ffmpeg2theora.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- ffmpeg2theora.spec 15 Aug 2013 10:15:27 -0000 1.21
+++ ffmpeg2theora.spec 20 Aug 2013 10:14:25 -0000 1.22
@@ -2,13 +2,14 @@
Name: ffmpeg2theora
Version: 0.29
-Release: 5%{?posttag}%{?dist}
+Release: 6%{?posttag}%{?dist}
Summary: Convert any file that ffmpeg can decode to theora
Group: Applications/Multimedia
License: GPLv2+
URL:
http://v2v.cc/~j/ffmpeg2theora/
Source0:
http://v2v.cc/~j/ffmpeg2theora/downloads/ffmpeg2theora-%{version}.tar.bz2
+Patch0: ffmpeg2theora-backport.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: scons
@@ -28,6 +29,7 @@
%prep
%setup -q -n %{name}-%{version}
+%patch0 -p1
%build
@@ -53,6 +55,9 @@
%changelog
+* Tue Aug 20 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 0.29-6
+- Backport support for ffmpeg 2.0x
+
* Thu Aug 15 2013 Nicolas Chauvet <kwizart(a)gmail.com> - 0.29-5
- Rebuilt for FFmpeg 2.0.x