timg: Fix build with ffmpeg 5.0

This commit is contained in:
Tee KOBAYASHI 2022-01-17 18:14:36 +09:00 committed by Leonid Pliushch
parent 50b5cc66ca
commit d51177aa78
2 changed files with 12 additions and 1 deletions

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A terminal image and video viewer"
TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.4.2 TERMUX_PKG_VERSION=1.4.2
TERMUX_PKG_REVISION=4 TERMUX_PKG_REVISION=5
TERMUX_PKG_SRCURL=https://github.com/hzeller/timg/archive/24d7727a4ba44b32fcdfb8e21fc258a4638fbbfe.tar.gz TERMUX_PKG_SRCURL=https://github.com/hzeller/timg/archive/24d7727a4ba44b32fcdfb8e21fc258a4638fbbfe.tar.gz
TERMUX_PKG_SHA256=5fe2a0f68dacfe367cc82ed5c3a21a9c1455ae78df1acedb7c02ed27ef502833 TERMUX_PKG_SHA256=5fe2a0f68dacfe367cc82ed5c3a21a9c1455ae78df1acedb7c02ed27ef502833
TERMUX_PKG_DEPENDS="ffmpeg, graphicsmagick, libc++, libjpeg-turbo, libexif, zlib" TERMUX_PKG_DEPENDS="ffmpeg, graphicsmagick, libc++, libjpeg-turbo, libexif, zlib"

View File

@ -0,0 +1,11 @@
--- a/src/video-display.cc
+++ b/src/video-display.cc
@@ -152,7 +152,7 @@
// Find the first video stream
AVCodecParameters *codec_parameters = nullptr;
- AVCodec *av_codec = nullptr;
+ const AVCodec *av_codec = nullptr;
for (int i = 0; i < (int)format_context_->nb_streams; ++i) {
codec_parameters = format_context_->streams[i]->codecpar;
av_codec = avcodec_find_decoder(codec_parameters->codec_id);