diff options
author | markd <markd@pkgsrc.org> | 2012-10-23 08:24:34 +0000 |
---|---|---|
committer | markd <markd@pkgsrc.org> | 2012-10-23 08:24:34 +0000 |
commit | c4478a0e6e93bf963bb7478cff69fa5398d85b83 (patch) | |
tree | 836fe356ee9615052a1a1aadc72247266122eae0 /sysutils/k3b | |
parent | 26187b235a8d2eb95ab00cadddfcb689ce0eb72d (diff) | |
download | pkgsrc-c4478a0e6e93bf963bb7478cff69fa5398d85b83.tar.gz |
Fix compilation with new FFMPEG
Diffstat (limited to 'sysutils/k3b')
-rw-r--r-- | sysutils/k3b/Makefile | 4 | ||||
-rw-r--r-- | sysutils/k3b/distinfo | 3 | ||||
-rw-r--r-- | sysutils/k3b/patches/patch-plugins_decoder_ffmpeg_k3bffmpegwrapper.cpp | 98 |
3 files changed, 102 insertions, 3 deletions
diff --git a/sysutils/k3b/Makefile b/sysutils/k3b/Makefile index b6eaf07399e..86daec7bc42 100644 --- a/sysutils/k3b/Makefile +++ b/sysutils/k3b/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.50 2012/10/08 23:02:26 adam Exp $ +# $NetBSD: Makefile,v 1.51 2012/10/23 08:24:34 markd Exp $ # DISTNAME= k3b-2.0.2 -PKGREVISION= 8 +PKGREVISION= 9 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=k3b/} EXTRACT_SUFX= .tar.bz2 diff --git a/sysutils/k3b/distinfo b/sysutils/k3b/distinfo index 4ebdf5ce1e1..8c22f54f098 100644 --- a/sysutils/k3b/distinfo +++ b/sysutils/k3b/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.18 2012/03/22 06:39:00 markd Exp $ +$NetBSD: distinfo,v 1.19 2012/10/23 08:24:34 markd Exp $ SHA1 (k3b-2.0.2.tar.bz2) = 8b30a4d07942e82559b01bc07dea6bcf2defd532 RMD160 (k3b-2.0.2.tar.bz2) = a0289eb9ccec9607c2bdac3fc7c69102eec5ee40 @@ -7,3 +7,4 @@ SHA1 (patch-libk3b_jobs_k3bdatatrackreader.cpp) = 124d5ba1a3384d012a8b471f55fd62 SHA1 (patch-libk3bdevice_k3bdevice.cpp) = 8533f0c08551ef9b8429792f607a52675f79e419 SHA1 (patch-libk3bdevice_k3bdevicemanager.cpp) = fe07915854808758ab9d989d11b61fdc3b4b95bd SHA1 (patch-libk3bdevice_k3bscsicommand_netbsd.cpp) = f2326f21219178443535fc4a80b8bdd46479b1ad +SHA1 (patch-plugins_decoder_ffmpeg_k3bffmpegwrapper.cpp) = ac2d1834013ab6845dcf9dc14c100618cc8c7027 diff --git a/sysutils/k3b/patches/patch-plugins_decoder_ffmpeg_k3bffmpegwrapper.cpp b/sysutils/k3b/patches/patch-plugins_decoder_ffmpeg_k3bffmpegwrapper.cpp new file mode 100644 index 00000000000..6f1ab65e1c7 --- /dev/null +++ b/sysutils/k3b/patches/patch-plugins_decoder_ffmpeg_k3bffmpegwrapper.cpp @@ -0,0 +1,98 @@ +$NetBSD: patch-plugins_decoder_ffmpeg_k3bffmpegwrapper.cpp,v 1.1 2012/10/23 08:24:34 markd Exp $ + +commit 61ca30beb978f68e72257408777c6433f33129bd +Author: Michal Malek <michalm@jabster.pl> +Date: Sun Aug 28 20:18:53 2011 +0200 + + Fixed compilation with new FFMPEG + + BUG: 274817 + FIXED-IN: 2.0.3 + +diff --git a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp +index 0ad59fc..0c5f366 100644 +--- plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp ++++ plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp +@@ -109,7 +109,13 @@ bool K3bFFMpegFile::open() + #else + ::AVCodecContext* codecContext = d->formatContext->streams[0]->codec; + #endif +- if( codecContext->codec_type != CODEC_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::typeComment() const + 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::title() const + 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::author() const + 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 @@ int K3bFFMpegFile::fillOutputBuffer() + #if LIBAVCODEC_VERSION_MAJOR < 52 + int len = ::avcodec_decode_audio( + #else ++ #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 @@ int K3bFFMpegFile::fillOutputBuffer() + #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 ); |