gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] [PATCH] fix build with ffmepg 4


From: Sandro Santilli
Subject: Re: [Gnash-dev] [PATCH] fix build with ffmepg 4
Date: Tue, 9 Nov 2021 14:39:20 +0100

Hi Zane, thanks for this.
I guess we'd want to add a compatibility macro
in libmedia/ffmpeg/ffmpegHeaders.h instead, to change
the least amount of code and still be compatible with older
ffmpeg

--strk;

On Tue, Nov 09, 2021 at 11:20:22AM +1000, Zane van Iperen wrote:
> ---
>  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 127aaaa08..216d96b1f 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 9ceb8b022..a27ca56c7 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);
>  
> -- 
> Originally a maintainer patch for NixOS, see [1]. Not subscribed, please Cc 
> replies.
> 
> [1]: 
> https://github.com/NixOS/nixpkgs/commit/1777da08a3edef2f6afd9f248dab77a71ed0dd6c



reply via email to

[Prev in Thread] Current Thread [Next in Thread]