3
0
Fork 0
forked from mirrors/nixpkgs

mplayer: fix build failure with ffmpeg 4.4

Backport SVN revision 38199.
This commit is contained in:
Zane van Iperen 2021-05-15 16:52:25 +10:00
parent bfb5f4cc5e
commit 960cd68773
No known key found for this signature in database
GPG key ID: 68616B2D8AC4DCC5
2 changed files with 24 additions and 0 deletions

View file

@ -106,6 +106,8 @@ stdenv.mkDerivation rec {
rm -rf ffmpeg
'';
patches = [ ./svn-r38199-ffmpeg44fix.patch ];
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ pkg-config yasm ];
buildInputs = with lib;

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);
}