packages: k3b/k3b-ffmpeg-0.8.patch - complete patch
lisu
lisu at pld-linux.org
Thu Jun 30 11:18:56 CEST 2011
Author: lisu Date: Thu Jun 30 09:18:56 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- complete patch
---- Files affected:
packages/k3b:
k3b-ffmpeg-0.8.patch (1.1 -> 1.2)
---- Diffs:
================================================================
Index: packages/k3b/k3b-ffmpeg-0.8.patch
diff -u packages/k3b/k3b-ffmpeg-0.8.patch:1.1 packages/k3b/k3b-ffmpeg-0.8.patch:1.2
--- packages/k3b/k3b-ffmpeg-0.8.patch:1.1 Thu Jun 30 11:00:34 2011
+++ packages/k3b/k3b-ffmpeg-0.8.patch Thu Jun 30 11:18:51 2011
@@ -1,11 +1,86 @@
---- k3b-2.0.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp~ 2011-01-15 21:47:29.000000000 +0100
-+++ k3b-2.0.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp 2011-06-30 10:57:03.437376120 +0200
-@@ -109,7 +109,7 @@
+--- k3b-2.0.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp.old 2011-01-15 21:47:29.000000000 +0100
++++ k3b-2.0.2/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp 2011-06-22 14:14:58.637253378 +0200
+@@ -109,7 +109,13 @@
#else
::AVCodecContext* codecContext = d->formatContext->streams[0]->codec;
#endif
- if( codecContext->codec_type != CODEC_TYPE_AUDIO ) {
-+ if( codecContext->codec_type != AVMEDIA_TYPE_AUDIO ) {
++ if( codecContext->codec_type !=
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 64, 0)
++ AVMEDIA_TYPE_AUDIO)
++#else
++ CODEC_TYPE_AUDIO)
++#endif
++ {
kDebug() << "(K3bFFMpegFile) not a simple audio stream: " << m_filename;
return false;
}
+@@ -225,8 +231,11 @@
+ QString K3bFFMpegFile::title() const
+ {
+ // FIXME: is this UTF8 or something??
+- if( d->formatContext->title[0] != '\0' )
+- return QString::fromLocal8Bit( d->formatContext->title );
++ AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata, "TITLE", NULL, 0 );
++ if( ade == NULL )
++ return QString();
++ if( ade->value != '\0' )
++ return QString::fromLocal8Bit( ade->value );
+ else
+ return QString();
+ }
+@@ -235,8 +244,11 @@
+ QString K3bFFMpegFile::author() const
+ {
+ // FIXME: is this UTF8 or something??
+- if( d->formatContext->author[0] != '\0' )
+- return QString::fromLocal8Bit( d->formatContext->author );
++ AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata, "ARTIST", NULL, 0 );
++ if( ade == NULL )
++ return QString();
++ if( ade->value != '\0' )
++ return QString::fromLocal8Bit( ade->value );
+ else
+ return QString();
+ }
+@@ -245,8 +257,11 @@
+ QString K3bFFMpegFile::comment() const
+ {
+ // FIXME: is this UTF8 or something??
+- if( d->formatContext->comment[0] != '\0' )
+- return QString::fromLocal8Bit( d->formatContext->comment );
++ AVDictionaryEntry *ade = av_dict_get( d->formatContext->metadata, "COMMENT", NULL, 0 );
++ if( ade == NULL )
++ return QString();
++ if( ade->value != '\0' )
++ return QString::fromLocal8Bit( ade->value );
+ else
+ return QString();
+ }
+@@ -309,8 +324,13 @@
+ #if LIBAVCODEC_VERSION_MAJOR < 52
+ int len = ::avcodec_decode_audio(
+ #else
+- int len = ::avcodec_decode_audio2(
++ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 64, 0)
++ int len = ::avcodec_decode_audio3(
++ #else
++ int len = ::avcodec_decode_audio2(
++ #endif
+ #endif
++
+ #ifdef FFMPEG_BUILD_PRE_4629
+ &d->formatContext->streams[0]->codec,
+ #else
+@@ -318,7 +338,11 @@
+ #endif
+ (short*)d->alignedOutputBuffer,
+ &d->outputBufferSize,
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 64, 0)
++ &d->packet );
++#else
+ d->packetData, d->packetSize );
++#endif
+
+ if( d->packetSize <= 0 || len < 0 )
+ ::av_free_packet( &d->packet );
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/k3b/k3b-ffmpeg-0.8.patch?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list