summaryrefslogtreecommitdiffstats
path: root/k3b/k3b-2.0.2-ffmpeg0.8.patch
diff options
context:
space:
mode:
Diffstat (limited to 'k3b/k3b-2.0.2-ffmpeg0.8.patch')
-rw-r--r--k3b/k3b-2.0.2-ffmpeg0.8.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/k3b/k3b-2.0.2-ffmpeg0.8.patch b/k3b/k3b-2.0.2-ffmpeg0.8.patch
new file mode 100644
index 000000000..b87efde43
--- /dev/null
+++ b/k3b/k3b-2.0.2-ffmpeg0.8.patch
@@ -0,0 +1,81 @@
+--- plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp.ffmpeg 2011-01-15 21:47:29.000000000 +0100
++++ plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp 2011-06-24 16:53:55.000000000 +0200
+@@ -109,7 +109,7 @@
+ #else
+ ::AVCodecContext* codecContext = d->formatContext->streams[0]->codec;
+ #endif
+- if( codecContext->codec_type != CODEC_TYPE_AUDIO ) {
++ if( codecContext->codec_type != AVMEDIA_TYPE_AUDIO ) {
+ kDebug() << "(K3bFFMpegFile) not a simple audio stream: " << m_filename;
+ return false;
+ }
+@@ -224,9 +224,11 @@
+
+ QString K3bFFMpegFile::title() const
+ {
++ AVMetadataTag *title;
++ title = av_metadata_get(d->formatContext->metadata, "title", NULL, 0);
+ // FIXME: is this UTF8 or something??
+- if( d->formatContext->title[0] != '\0' )
+- return QString::fromLocal8Bit( d->formatContext->title );
++ if( title )
++ return QString::fromLocal8Bit( title->value );
+ else
+ return QString();
+ }
+@@ -234,9 +236,11 @@
+
+ QString K3bFFMpegFile::author() const
+ {
++ AVMetadataTag *author;
++ author = av_metadata_get(d->formatContext->metadata, "author", NULL, 0);
+ // FIXME: is this UTF8 or something??
+- if( d->formatContext->author[0] != '\0' )
+- return QString::fromLocal8Bit( d->formatContext->author );
++ if( author )
++ return QString::fromLocal8Bit( author->value );
+ else
+ return QString();
+ }
+@@ -244,9 +248,11 @@
+
+ QString K3bFFMpegFile::comment() const
+ {
++ AVMetadataTag *comment;
++ comment = av_metadata_get(d->formatContext->metadata, "comment", NULL, 0);
+ // FIXME: is this UTF8 or something??
+- if( d->formatContext->comment[0] != '\0' )
+- return QString::fromLocal8Bit( d->formatContext->comment );
++ if( comment )
++ return QString::fromLocal8Bit( comment->value );
+ else
+ return QString();
+ }
+@@ -308,8 +314,14 @@
+
+ #if LIBAVCODEC_VERSION_MAJOR < 52
+ int len = ::avcodec_decode_audio(
+-#else
++#elif LIBAVCODEC_VERSION_MAJOR == 52
+ 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
+ #ifdef FFMPEG_BUILD_PRE_4629
+ &d->formatContext->streams[0]->codec,
+@@ -318,7 +330,11 @@
+ #endif
+ (short*)d->alignedOutputBuffer,
+ &d->outputBufferSize,
++#if LIBAVCODEC_VERSION_MAJOR < 53
+ d->packetData, d->packetSize );
++#else
++ &avpkt);
++#endif
+
+ if( d->packetSize <= 0 || len < 0 )
+ ::av_free_packet( &d->packet );