diff options
author | Sam James <sam@gentoo.org> | 2023-04-10 10:24:13 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-04-10 10:24:13 +0100 |
commit | b489b1a671b51c3def4b4cdfdd419155caad4b73 (patch) | |
tree | 47f57f74707a824294752e1a20376bbc2d530235 /media-video | |
parent | app-text/groonga: add 13.0.1 (diff) | |
download | gentoo-b489b1a671b51c3def4b4cdfdd419155caad4b73.tar.gz gentoo-b489b1a671b51c3def4b4cdfdd419155caad4b73.tar.bz2 gentoo-b489b1a671b51c3def4b4cdfdd419155caad4b73.zip |
media-video/gpac: fix build w/ >=ffmpeg-5
Closes: https://bugs.gentoo.org/903550
Thanks-to: Andrew Udvare <audvare@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-video')
-rw-r--r-- | media-video/gpac/files/gpac-2.2.0-ffmpeg6-deux.patch | 46 | ||||
-rw-r--r-- | media-video/gpac/gpac-2.2.0.ebuild | 1 |
2 files changed, 47 insertions, 0 deletions
diff --git a/media-video/gpac/files/gpac-2.2.0-ffmpeg6-deux.patch b/media-video/gpac/files/gpac-2.2.0-ffmpeg6-deux.patch new file mode 100644 index 000000000000..695852847395 --- /dev/null +++ b/media-video/gpac/files/gpac-2.2.0-ffmpeg6-deux.patch @@ -0,0 +1,46 @@ +https://bugs.gentoo.org/903550 + +From ba14e34dd7a3c4cef5a56962898e9f863dd4b4f3 Mon Sep 17 00:00:00 2001 +From: jeanlf <jeanlf@gpac.io> +Date: Mon, 13 Mar 2023 09:43:52 +0100 +Subject: [PATCH] fixed compil with ffmpeg 6 - cf #2406 + +--- a/src/filters/ff_mx.c ++++ b/src/filters/ff_mx.c +@@ -503,7 +503,11 @@ static GF_Err ffmx_close_seg(GF_Filter *filter, GF_FFMuxCtx *ctx, Bool send_evt_ + evt.seg_size.is_init = 0; + } + evt.seg_size.media_range_start = ctx->offset_at_seg_start; ++#if LIBAVFORMAT_VERSION_MAJOR >= 60 + evt.seg_size.media_range_end = ctx->muxer->pb ? (ctx->muxer->pb->bytes_written-1) : 0; ++#else ++ evt.seg_size.media_range_end = ctx->muxer->pb ? (ctx->muxer->pb->written-1) : 0; ++#endif + ctx->offset_at_seg_start = evt.seg_size.media_range_end; + + gf_filter_pid_send_event(pid, &evt); +@@ -1013,13 +1017,21 @@ static GF_Err ffmx_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_r + ff_codec_id = ffmpeg_codecid_from_gpac(codec_id, &ff_codec_tag); + } + ++ ++ res = 1; ++#if LIBAVFORMAT_VERSION_MAJOR < 60 + if (ctx->muxer->oformat) { + res = avformat_query_codec(ctx->muxer->oformat, ff_codec_id, 1); +- if (!res) { +- GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMux] Codec %s not supported in container %s\n", gf_codecid_name(codec_id), ctx->muxer->oformat->name)); +- return GF_NOT_SUPPORTED; +- } + } ++#else ++ res = avformat_query_codec(ctx->muxer->oformat, ff_codec_id, FF_COMPLIANCE_NORMAL); ++#endif ++ ++ if (!res) { ++ GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMux] Codec %s not supported in container %s\n", gf_codecid_name(codec_id), ctx->muxer->oformat->name)); ++ return GF_NOT_SUPPORTED; ++ } ++ + const AVCodec *c = avcodec_find_decoder(ff_codec_id); + if (!c) return GF_NOT_SUPPORTED; diff --git a/media-video/gpac/gpac-2.2.0.ebuild b/media-video/gpac/gpac-2.2.0.ebuild index d8ee67521cd8..d6a91321cd56 100644 --- a/media-video/gpac/gpac-2.2.0.ebuild +++ b/media-video/gpac/gpac-2.2.0.ebuild @@ -66,6 +66,7 @@ PATCHES=( "${FILESDIR}/${PN}-2.2.0-configure.patch" "${FILESDIR}/${PN}-1.0.0-zlib-compile.patch" "${FILESDIR}/${PN}-2.2.0-ffmpeg6.patch" + "${FILESDIR}/${PN}-2.2.0-ffmpeg6-deux.patch" ) DOCS=( |