summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2015-09-16 16:06:40 +0200
committerAlexis Ballier <aballier@gentoo.org>2015-09-16 16:06:40 +0200
commit45ab11f0ed557d140feae5757b55d532fa47a196 (patch)
tree5c548a59838bd58cb25008acb3a04bcd87aa2670 /media-video/ffmpegthumbnailer
parentmedia-video/transcode: fix build with ffmpeg git master. (diff)
downloadgentoo-45ab11f0ed557d140feae5757b55d532fa47a196.tar.gz
gentoo-45ab11f0ed557d140feae5757b55d532fa47a196.tar.bz2
gentoo-45ab11f0ed557d140feae5757b55d532fa47a196.zip
media-video/ffmpegthumbnailer: fix build with ffmpeg git master.
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'media-video/ffmpegthumbnailer')
-rw-r--r--media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.10.ebuild3
-rw-r--r--media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.10-ffmpeg29.patch62
2 files changed, 64 insertions, 1 deletions
diff --git a/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.10.ebuild b/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.10.ebuild
index 96de427c9ba5..c01ea0ba86f7 100644
--- a/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.10.ebuild
+++ b/media-video/ffmpegthumbnailer/ffmpegthumbnailer-2.0.10.ebuild
@@ -4,7 +4,7 @@
EAPI=5
-inherit cmake-utils
+inherit cmake-utils eutils
DESCRIPTION="Lightweight video thumbnailer that can be used by file managers"
HOMEPAGE="https://github.com/dirkvdb/ffmpegthumbnailer"
@@ -39,6 +39,7 @@ src_prepare() {
rm -rf out* || die
cmake-utils_src_prepare
+ has_version '>=media-video/ffmpeg-2.9' && epatch "${FILESDIR}/${P}-ffmpeg29.patch"
}
src_configure() {
diff --git a/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.10-ffmpeg29.patch b/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.10-ffmpeg29.patch
new file mode 100644
index 000000000000..fb50ae85eb85
--- /dev/null
+++ b/media-video/ffmpegthumbnailer/files/ffmpegthumbnailer-2.0.10-ffmpeg29.patch
@@ -0,0 +1,62 @@
+Index: ffmpegthumbnailer-2.0.10/libffmpegthumbnailer/moviedecoder.cpp
+===================================================================
+--- ffmpegthumbnailer-2.0.10.orig/libffmpegthumbnailer/moviedecoder.cpp
++++ ffmpegthumbnailer-2.0.10/libffmpegthumbnailer/moviedecoder.cpp
+@@ -266,7 +266,7 @@ bool MovieDecoder::decodeVideoPacket()
+ return false;
+ }
+
+- avcodec_get_frame_defaults(m_pFrame);
++ av_frame_unref(m_pFrame);
+
+ int frameFinished;
+
+@@ -312,14 +312,8 @@ bool MovieDecoder::getVideoPacket()
+
+ void MovieDecoder::getScaledVideoFrame(int scaledSize, bool maintainAspectRatio, VideoFrame& videoFrame)
+ {
+- if (m_pFrame->interlaced_frame)
+- {
+- avpicture_deinterlace((AVPicture*) m_pFrame, (AVPicture*) m_pFrame, m_pVideoCodecContext->pix_fmt,
+- m_pVideoCodecContext->width, m_pVideoCodecContext->height);
+- }
+-
+ int scaledWidth, scaledHeight;
+- convertAndScaleFrame(PIX_FMT_RGB24, scaledSize, maintainAspectRatio, scaledWidth, scaledHeight);
++ convertAndScaleFrame(AV_PIX_FMT_RGB24, scaledSize, maintainAspectRatio, scaledWidth, scaledHeight);
+
+ videoFrame.width = scaledWidth;
+ videoFrame.height = scaledHeight;
+@@ -330,7 +324,7 @@ void MovieDecoder::getScaledVideoFrame(i
+ memcpy((&(videoFrame.frameData.front())), m_pFrame->data[0], videoFrame.lineSize * videoFrame.height);
+ }
+
+-void MovieDecoder::convertAndScaleFrame(PixelFormat format, int scaledSize, bool maintainAspectRatio, int& scaledWidth, int& scaledHeight)
++void MovieDecoder::convertAndScaleFrame(AVPixelFormat format, int scaledSize, bool maintainAspectRatio, int& scaledWidth, int& scaledHeight)
+ {
+ calculateDimensions(scaledSize, maintainAspectRatio, scaledWidth, scaledHeight);
+
+@@ -427,7 +421,7 @@ void MovieDecoder::calculateDimensions(i
+ }
+ }
+
+-void MovieDecoder::createAVFrame(AVFrame** pAvFrame, uint8_t** pFrameBuffer, int width, int height, PixelFormat format)
++void MovieDecoder::createAVFrame(AVFrame** pAvFrame, uint8_t** pFrameBuffer, int width, int height, AVPixelFormat format)
+ {
+ *pAvFrame = av_frame_alloc();
+
+Index: ffmpegthumbnailer-2.0.10/libffmpegthumbnailer/moviedecoder.h
+===================================================================
+--- ffmpegthumbnailer-2.0.10.orig/libffmpegthumbnailer/moviedecoder.h
++++ ffmpegthumbnailer-2.0.10/libffmpegthumbnailer/moviedecoder.h
+@@ -54,8 +54,8 @@ private:
+
+ bool decodeVideoPacket();
+ bool getVideoPacket();
+- void convertAndScaleFrame(PixelFormat format, int scaledSize, bool maintainAspectRatio, int& scaledWidth, int& scaledHeight);
+- void createAVFrame(AVFrame** pAvFrame, uint8_t** pFrameBuffer, int width, int height, PixelFormat format);
++ void convertAndScaleFrame(AVPixelFormat format, int scaledSize, bool maintainAspectRatio, int& scaledWidth, int& scaledHeight);
++ void createAVFrame(AVFrame** pAvFrame, uint8_t** pFrameBuffer, int width, int height, AVPixelFormat format);
+ void calculateDimensions(int squareSize, bool maintainAspectRatio, int& destWidth, int& destHeight);
+
+ private: