rpms/k3b-extras-freeworld/devel k3b-2.0.2-ffmpeg08.patch, NONE, 1.1 k3b-extras-freeworld.spec, 1.25, 1.26 k3b-1.91.0-ffmpeg06.patch, 1.1, NONE

Kevin Kofler kkofler at rpmfusion.org
Fri Sep 30 00:13:08 CEST 2011


Author: kkofler

Update of /cvs/free/rpms/k3b-extras-freeworld/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv17950/devel

Modified Files:
	k3b-extras-freeworld.spec 
Added Files:
	k3b-2.0.2-ffmpeg08.patch 
Removed Files:
	k3b-1.91.0-ffmpeg06.patch 
Log Message:
* Thu Sep 29 2011 Kevin Kofler <Kevin at tigcc.ticalc.org> - 1:2.0.2-2
- fix build with FFmpeg 0.8 (#1960)

k3b-2.0.2-ffmpeg08.patch:
 k3bffmpegwrapper.cpp |   35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

--- NEW FILE k3b-2.0.2-ffmpeg08.patch ---
diff -up k3b-2.0.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp.ffmpeg k3b-2.0.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
--- k3b-2.0.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp.ffmpeg	2011-01-15 21:47:29.000000000 +0100
+++ k3b-2.0.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp	2011-09-03 16:15:35.000000000 +0200
@@ -109,7 +109,11 @@ bool K3bFFMpegFile::open()
 #else
     ::AVCodecContext* codecContext =  d->formatContext->streams[0]->codec;
 #endif
+#if LIBAVCODEC_VERSION_MAJOR < 53
     if( codecContext->codec_type != CODEC_TYPE_AUDIO ) {
+#else
+    if( codecContext->codec_type != AVMEDIA_TYPE_AUDIO ) {
+#endif
         kDebug() << "(K3bFFMpegFile) not a simple audio stream: " << m_filename;
         return false;
     }
@@ -225,8 +229,14 @@ QString K3bFFMpegFile::typeComment() con
 QString K3bFFMpegFile::title() const
 {
     // FIXME: is this UTF8 or something??
+#if FF_API_OLD_METADATA
     if( d->formatContext->title[0] != '\0' )
         return QString::fromLocal8Bit( d->formatContext->title );
+#else
+    AVDictionaryEntry *entry=av_metadata_get(d->formatContext->metadata,"title",NULL,0);
+    if( entry->value != NULL )
+        return QString::fromLocal8Bit( entry->value );
+#endif
     else
         return QString();
 }
@@ -235,8 +245,14 @@ QString K3bFFMpegFile::title() const
 QString K3bFFMpegFile::author() const
 {
     // FIXME: is this UTF8 or something??
+#if FF_API_OLD_METADATA
     if( d->formatContext->author[0] != '\0' )
         return QString::fromLocal8Bit( d->formatContext->author );
+#else
+    AVDictionaryEntry *entry=av_metadata_get(d->formatContext->metadata,"author",NULL,0);
+    if( entry->value != NULL )
+        return QString::fromLocal8Bit( entry->value );
+#endif
     else
         return QString();
 }
@@ -245,8 +261,14 @@ QString K3bFFMpegFile::author() const
 QString K3bFFMpegFile::comment() const
 {
     // FIXME: is this UTF8 or something??
+#if FF_API_OLD_METADATA
     if( d->formatContext->comment[0] != '\0' )
         return QString::fromLocal8Bit( d->formatContext->comment );
+#else
+    AVDictionaryEntry *entry=av_metadata_get(d->formatContext->metadata,"comment",NULL,0);
+    if( entry->value != NULL )
+        return QString::fromLocal8Bit( entry->value );
+#endif
     else
         return QString();
 }
@@ -306,10 +328,19 @@ int K3bFFMpegFile::fillOutputBuffer()
         d->outputBufferPos = d->alignedOutputBuffer;
         d->outputBufferSize = AVCODEC_MAX_AUDIO_FRAME_SIZE;
 
+
 #if LIBAVCODEC_VERSION_MAJOR < 52
         int len = ::avcodec_decode_audio(
 #else
+#if FF_API_AUDIO_OLD
         int len = ::avcodec_decode_audio2(
+#else
+        AVPacket avpkt;
+        av_init_packet(&avpkt);
+        avpkt.data = d->packetData;
+        avpkt.size = d->packetSize;
+        int len = ::avcodec_decode_audio3(
+#endif
 #endif
 #ifdef FFMPEG_BUILD_PRE_4629
             &d->formatContext->streams[0]->codec,
@@ -318,7 +349,11 @@ int K3bFFMpegFile::fillOutputBuffer()
 #endif
             (short*)d->alignedOutputBuffer,
             &d->outputBufferSize,
+#if FF_API_AUDIO_OLD
             d->packetData, d->packetSize );
+#else
+            &avpkt );
+#endif
 
         if( d->packetSize <= 0 || len < 0 )
             ::av_free_packet( &d->packet );

Index: k3b-extras-freeworld.spec
===================================================================
RCS file: /cvs/free/rpms/k3b-extras-freeworld/devel/k3b-extras-freeworld.spec,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- k3b-extras-freeworld.spec	17 Sep 2011 13:57:30 -0000	1.25
+++ k3b-extras-freeworld.spec	29 Sep 2011 22:13:08 -0000	1.26
@@ -3,14 +3,14 @@
 Summary: Additional codec plugins for the k3b CD/DVD burning application
 Epoch:   1
 Version: 2.0.2
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 Group:   Applications/Archiving
 License: GPLv2+
 URL:     http://www.k3b.org/
 Source0: http://downloads.sourceforge.net/sourceforge/k3b/k3b-%{version}%{?pre}.tar.bz2
-# fix build with FFmpeg 0.6 snapshots (define __STDC_CONSTANT_MACROS)
-Patch1:  k3b-1.91.0-ffmpeg06.patch
+# fix build with FFmpeg 0.8 (#1960)
+Patch1:  k3b-2.0.2-ffmpeg08.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 # TODO: bugzilla/document
 ExcludeArch: s390 s390x
@@ -48,9 +48,7 @@
 
 %prep
 %setup -q -n k3b-%{version}
-## seems no longer needed with ffmpeg-0.6+k3b-2.0.1 at least, 
-## keep it around temporarily just in case -- Rex
-#patch1 -p1 -b .ffmpeg06
+%patch1 -p1 -b .ffmpeg08
 
 
 %build
@@ -94,6 +92,9 @@
 
 
 %changelog
+* Thu Sep 29 2011 Kevin Kofler <Kevin at tigcc.ticalc.org> - 1:2.0.2-2
+- fix build with FFmpeg 0.8 (#1960)
+
 * Sat Sep 17 2011 Kevin Kofler <Kevin at tigcc.ticalc.org> - 1:2.0.2-1
 - update to 2.0.2
 - Requires: k3b >= %{epoch}:%{version} rather than just %{version}


--- k3b-1.91.0-ffmpeg06.patch DELETED ---



More information about the rpmfusion-commits mailing list