Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 831604 - media-plugins/gst-plugins-libav-1.18.4 fails to build against ffmpeg-5
Summary: media-plugins/gst-plugins-libav-1.18.4 fails to build against ffmpeg-5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: GStreamer package maintainers
URL: https://gitlab.freedesktop.org/gstrea...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: ffmpeg-5.0
  Show dependency tree
 
Reported: 2022-01-20 15:57 UTC by Reuben Martin
Modified: 2022-03-15 21:26 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (build.log,30.11 KB, text/plain)
2022-01-20 15:58 UTC, Reuben Martin
Details
Patch to build gst-plugins-libav with ffmpeg 5 (gst-libav-ffmpeg5.patch,13.05 KB, patch)
2022-02-04 21:36 UTC, thomasg
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Reuben Martin 2022-01-20 15:57:56 UTC
Depreciated APIs were removed in ffmpeg-5

Reproducible: Always
Comment 1 Reuben Martin 2022-01-20 15:58:45 UTC
Created attachment 762864 [details]
Build log
Comment 2 Tee KOBAYASHI 2022-01-20 16:31:10 UTC
Upstream issue: https://gitlab.freedesktop.org/gstreamer/gst-libav/-/issues/97
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-20 16:32:02 UTC
Yeah, if you could check upstream for any bug links, that'd be really helpful too! But not required.
Comment 4 jospezial 2022-01-21 06:44:34 UTC
Does somebody want to test if this can be backported and then create a request upstream?:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/6ea56e7fd39c48e718a10b6e69ec214532789a59
" gst-libav: fix build with ffmpeg-5.0.0

Latest ffmpeg has removed avcodec_get_context_defaults(), and its
documentation says a new AVCodecContext should be allocated for this
purpose.  The pointer returned by avcodec_find_decoder() is now
const-qualified so we also need to adjust for it.  And, AVCOL_RANGE_MPEG
is now rejected with strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL."
Comment 5 thomasg 2022-02-04 21:36:06 UTC
(In reply to jospezial from comment #4)
> Does somebody want to test if this can be backported and then create a
> request upstream?:
> https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/
> 6ea56e7fd39c48e718a10b6e69ec214532789a59
> " gst-libav: fix build with ffmpeg-5.0.0
> 
> Latest ffmpeg has removed avcodec_get_context_defaults(), and its
> documentation says a new AVCodecContext should be allocated for this
> purpose.  The pointer returned by avcodec_find_decoder() is now
> const-qualified so we also need to adjust for it.  And, AVCOL_RANGE_MPEG
> is now rejected with strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL."

Backporting is basically not necessary, the patch just applies with minor changes to the file paths.
Works for me via user patches without any other modifications.
I'll attach the modified patch file, based on the commit from your link.
Comment 6 thomasg 2022-02-04 21:36:57 UTC
Created attachment 764358 [details, diff]
Patch to build gst-plugins-libav with ffmpeg 5
Comment 7 jospezial 2022-02-05 01:51:50 UTC
(In reply to thomasg from comment #6)
> Created attachment 764358 [details, diff] [details, diff]
> Patch to build gst-plugins-libav with ffmpeg 5

media-plugins/gst-plugins-libav-1.18.4 also compiles with this patch against ffmpeg-4.4.x

Upstream did not want to backport it to 1.18.6.
Comment 8 Gary E. Miller 2022-03-15 19:33:00 UTC
Can someone please move the MR along?  9 days gone by.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-15 19:41:39 UTC
(In reply to Gary E. Miller from comment #8)
> Can someone please move the MR along?  9 days gone by.

We're generally not in a hurry with the various ffmpeg 5 things given most stuff still has no upstream fixes. Anyway, yes, sure, I thought i'd got to that one.
Comment 10 Larry the Git Cow gentoo-dev 2022-03-15 19:47:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b11c0db3e5c71771b390c582e26ddfcd2f4262cd

commit b11c0db3e5c71771b390c582e26ddfcd2f4262cd
Author:     Haelwenn (lanodan) Monnier <contact@hacktivis.me>
AuthorDate: 2022-03-06 20:41:34 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-03-15 19:47:33 +0000

    media-plugins/gst-plugins-libav: Fix ffmpeg-5 compatibility with 1.18.4
    
    Closes: https://bugs.gentoo.org/831604
    Signed-off-by: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
    Closes: https://github.com/gentoo/gentoo/pull/24426
    Signed-off-by: Sam James <sam@gentoo.org>

 media-plugins/gst-plugins-libav/Manifest           |  1 +
 .../gst-plugins-libav-1.18.4-r1.ebuild             | 34 ++++++++++++++++++++++
 2 files changed, 35 insertions(+)
Comment 11 Gary E. Miller 2022-03-15 21:26:10 UTC
Thank you!  And my Media Center thanks you!