mplayer: backport latest derivation from unstable to fix build

reason: the option for enabling v4l is still only available on unstable,
thus it needs to be backported for stable use.
derivation update necessary due to ffmpeg3 marked as insecure
This commit is contained in:
Trolli Schmittlauch 2021-05-22 11:14:35 +02:00
parent 873722dd0e
commit e00f104ec6
2 changed files with 26 additions and 2 deletions

View file

@ -1,4 +1,4 @@
{ config, lib, stdenv, fetchurl, pkg-config, freetype, yasm, ffmpeg_3
{ config, lib, stdenv, fetchurl, pkg-config, freetype, yasm, ffmpeg
, aalibSupport ? true, aalib ? null
, fontconfigSupport ? true, fontconfig ? null, freefont_ttf ? null
, fribidiSupport ? true, fribidi ? null
@ -106,10 +106,12 @@ stdenv.mkDerivation rec {
rm -rf ffmpeg
'';
patches = [ ./svn-r38199-ffmpeg44fix.patch ];
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ pkg-config yasm ];
buildInputs = with lib;
[ freetype ffmpeg_3 ]
[ freetype ffmpeg ]
++ optional aalibSupport aalib
++ optional fontconfigSupport fontconfig
++ optional fribidiSupport fribidi

View file

@ -0,0 +1,22 @@
Index: libmpcodecs/ad_spdif.c
===================================================================
diff --git a/libmpcodecs/ad_spdif.c b/libmpcodecs/ad_spdif.c
--- a/libmpcodecs/ad_spdif.c (revision 38198)
+++ b/libmpcodecs/ad_spdif.c (revision 38199)
@@ -298,14 +298,8 @@
if (spdif_ctx->header_written)
av_write_trailer(lavf_ctx);
av_freep(&lavf_ctx->pb);
- if (lavf_ctx->streams) {
- av_freep(&lavf_ctx->streams[0]->codec);
- av_freep(&lavf_ctx->streams[0]->info);
- av_freep(&lavf_ctx->streams[0]);
- }
- av_freep(&lavf_ctx->streams);
- av_freep(&lavf_ctx->priv_data);
+ avformat_free_context(lavf_ctx);
+ lavf_ctx = NULL;
}
- av_freep(&lavf_ctx);
av_freep(&spdif_ctx);
}