mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
gnash: build with newer ffmpeg
This commit is contained in:
parent
960eb082f1
commit
1777da08a3
57
pkgs/misc/gnash/0001-fix-build-with-ffmepg-4.patch
Normal file
57
pkgs/misc/gnash/0001-fix-build-with-ffmepg-4.patch
Normal file
@ -0,0 +1,57 @@
|
||||
From cb13c20332526a4db99e7fd0818b9a75829affad Mon Sep 17 00:00:00 2001
|
||||
From: Zane van Iperen <zane@zanevaniperen.com>
|
||||
Date: Sun, 7 Nov 2021 15:36:02 +1000
|
||||
Subject: [PATCH] fix build with ffmepg 4
|
||||
|
||||
---
|
||||
libmedia/ffmpeg/MediaHandlerFfmpeg.cpp | 2 +-
|
||||
libmedia/ffmpeg/MediaParserFfmpeg.cpp | 6 +++---
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp b/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
|
||||
index 127aaaa..216d96b 100644
|
||||
--- a/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
|
||||
+++ b/libmedia/ffmpeg/MediaHandlerFfmpeg.cpp
|
||||
@@ -149,7 +149,7 @@ MediaHandlerFfmpeg::cameraNames(std::vector<std::string>& /*names*/) const
|
||||
size_t
|
||||
MediaHandlerFfmpeg::getInputPaddingSize() const
|
||||
{
|
||||
- return FF_INPUT_BUFFER_PADDING_SIZE;
|
||||
+ return AV_INPUT_BUFFER_PADDING_SIZE;
|
||||
}
|
||||
|
||||
} // gnash.media.ffmpeg namespace
|
||||
diff --git a/libmedia/ffmpeg/MediaParserFfmpeg.cpp b/libmedia/ffmpeg/MediaParserFfmpeg.cpp
|
||||
index 9ceb8b0..a27ca56 100644
|
||||
--- a/libmedia/ffmpeg/MediaParserFfmpeg.cpp
|
||||
+++ b/libmedia/ffmpeg/MediaParserFfmpeg.cpp
|
||||
@@ -64,7 +64,7 @@ AVInputFormat*
|
||||
MediaParserFfmpeg::probeStream()
|
||||
{
|
||||
const size_t probeSize = 4096;
|
||||
- const size_t bufSize = probeSize + FF_INPUT_BUFFER_PADDING_SIZE;
|
||||
+ const size_t bufSize = probeSize + AV_INPUT_BUFFER_PADDING_SIZE;
|
||||
|
||||
std::unique_ptr<std::uint8_t[]> buffer(new std::uint8_t[bufSize]);
|
||||
|
||||
@@ -173,7 +173,7 @@ MediaParserFfmpeg::parseVideoFrame(AVPacket& packet)
|
||||
|
||||
// TODO: We might avoid the copy as a whole by making EncodedVideoFrame
|
||||
// virtual.
|
||||
- size_t allocSize = packet.size + FF_INPUT_BUFFER_PADDING_SIZE;
|
||||
+ size_t allocSize = packet.size + AV_INPUT_BUFFER_PADDING_SIZE;
|
||||
std::uint8_t* data = new std::uint8_t[allocSize];
|
||||
std::copy(packet.data, packet.data+packet.size, data);
|
||||
std::unique_ptr<EncodedVideoFrame> frame(new EncodedVideoFrame(data, packet.size, 0, timestamp));
|
||||
@@ -221,7 +221,7 @@ MediaParserFfmpeg::parseAudioFrame(AVPacket& packet)
|
||||
|
||||
// TODO: We might avoid the copy as a whole by making EncodedAudioFrame
|
||||
// virtual.
|
||||
- size_t allocSize = packet.size + FF_INPUT_BUFFER_PADDING_SIZE;
|
||||
+ size_t allocSize = packet.size + AV_INPUT_BUFFER_PADDING_SIZE;
|
||||
std::uint8_t* data = new std::uint8_t[allocSize];
|
||||
std::copy(packet.data, packet.data+packet.size, data);
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
@ -16,7 +16,7 @@
|
||||
, enableQt ? false, qt4 ? null
|
||||
|
||||
# media
|
||||
, enableFFmpeg ? true, ffmpeg_2 ? null
|
||||
, enableFFmpeg ? true, ffmpeg ? null
|
||||
|
||||
# misc
|
||||
, enableJemalloc ? true, jemalloc ? null
|
||||
@ -55,7 +55,7 @@ assert enableSDL -> available SDL;
|
||||
assert enableQt -> available qt4;
|
||||
|
||||
# media libraries
|
||||
assert enableFFmpeg -> available ffmpeg_2 ;
|
||||
assert enableFFmpeg -> available ffmpeg ;
|
||||
|
||||
# misc
|
||||
assert enableJemalloc -> available jemalloc;
|
||||
@ -88,7 +88,7 @@ stdenv.mkDerivation {
|
||||
] ++ optional enableAGG agg
|
||||
++ optional enableCairo cairo
|
||||
++ optional enableQt qt4
|
||||
++ optional enableFFmpeg ffmpeg_2
|
||||
++ optional enableFFmpeg ffmpeg
|
||||
++ optional enableJemalloc jemalloc
|
||||
++ optional enableHwAccel [ libGL libGLU ]
|
||||
++ optionals enableOpenGL [ libGL libGLU ]
|
||||
@ -107,6 +107,8 @@ stdenv.mkDerivation {
|
||||
url = "https://savannah.gnu.org/file/0001-Do-not-depend-on-pangox.patch?file_id=48366";
|
||||
sha256 = "02x7sl5zwd1ld2n4b6bp16c5gk91qsap0spfbb5iwpglq3galv2l";
|
||||
})
|
||||
|
||||
./0001-fix-build-with-ffmepg-4.patch
|
||||
];
|
||||
|
||||
configureFlags = with lib; [
|
||||
|
Loading…
Reference in New Issue
Block a user