From c065703b788567e83c2588ad2f84c23aa6af4fb5 Mon Sep 17 00:00:00 2001 From: Leigh Scott Date: Thu, 31 Dec 2020 21:10:57 +0000 Subject: [PATCH] Rebuilt for new ffmpeg snapshot --- ...fc7408b5fb46c698e17471d12dd53d5685ec.patch | 37 +++++++++++++++++++ mplayer.spec | 2 + 2 files changed, 39 insertions(+) create mode 100644 mplayer.git-7ba6fc7408b5fb46c698e17471d12dd53d5685ec.patch diff --git a/mplayer.git-7ba6fc7408b5fb46c698e17471d12dd53d5685ec.patch b/mplayer.git-7ba6fc7408b5fb46c698e17471d12dd53d5685ec.patch new file mode 100644 index 0000000..1bfbbdb --- /dev/null +++ b/mplayer.git-7ba6fc7408b5fb46c698e17471d12dd53d5685ec.patch @@ -0,0 +1,37 @@ +From 7ba6fc7408b5fb46c698e17471d12dd53d5685ec Mon Sep 17 00:00:00 2001 +From: reimar +Date: Sun, 1 Nov 2020 15:07:44 +0000 +Subject: [PATCH] ad_spdif: Use avformat_free_context to free context. + +This avoids memleaks and in newest FFmpeg versions also +compile errors. + +git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@38199 b3059339-0415-0410-9bf9-f77b7e298cf2 +--- + libmpcodecs/ad_spdif.c | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +diff --git a/libmpcodecs/ad_spdif.c b/libmpcodecs/ad_spdif.c +index 1fc237b..8ee4724 100644 +--- a/libmpcodecs/ad_spdif.c ++++ b/libmpcodecs/ad_spdif.c +@@ -298,14 +298,8 @@ static void uninit(sh_audio_t *sh) + 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); + } +-- +2.7.4 + diff --git a/mplayer.spec b/mplayer.spec index 04f4292..f2d3410 100644 --- a/mplayer.spec +++ b/mplayer.spec @@ -40,6 +40,7 @@ Patch3: %{name}-ffmpeg.patch Patch4: 0001-codecs.conf-Add-AV1-decoder-dav1d-via-FFmpeg.patch Patch5: 0002-codecs.conf-Add-AOM-AV1-decoder-via-FFmpeg.patch Patch6: 0003-codecs.conf-Bump-version.patch +Patch7: mplayer.git-7ba6fc7408b5fb46c698e17471d12dd53d5685ec.patch BuildRequires: SDL-devel BuildRequires: a52dec-devel @@ -235,6 +236,7 @@ rm -rf ffmpeg %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 mkdir GUI cp -a `ls -1|grep -v GUI` GUI/