commit:     6d10649f4bd5343beaaab6c57638df2df3a3b3e7
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 17 07:31:16 2018 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Tue Jul 17 07:33:25 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d10649f

media-video/ffmpeg: bp us patch to fix mpv crash regression

Closes: https://bugs.gentoo.org/661220
Package-Manager: Portage-2.3.43, Repoman-2.3.10

 ...{ffmpeg-3.4.3.ebuild => ffmpeg-3.4.3-r1.ebuild} |  1 +
 media-video/ffmpeg/files/imgc.patch                | 29 ++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/media-video/ffmpeg/ffmpeg-3.4.3.ebuild 
b/media-video/ffmpeg/ffmpeg-3.4.3-r1.ebuild
similarity index 99%
rename from media-video/ffmpeg/ffmpeg-3.4.3.ebuild
rename to media-video/ffmpeg/ffmpeg-3.4.3-r1.ebuild
index aa8b226963b..cfc053565cd 100644
--- a/media-video/ffmpeg/ffmpeg-3.4.3.ebuild
+++ b/media-video/ffmpeg/ffmpeg-3.4.3-r1.ebuild
@@ -290,6 +290,7 @@ S=${WORKDIR}/${P/_/-}
 
 PATCHES=(
        "${FILESDIR}"/chromium.patch
+       "${FILESDIR}"/imgc.patch
 )
 
 MULTILIB_WRAPPED_HEADERS=(

diff --git a/media-video/ffmpeg/files/imgc.patch 
b/media-video/ffmpeg/files/imgc.patch
new file mode 100644
index 00000000000..793299ad703
--- /dev/null
+++ b/media-video/ffmpeg/files/imgc.patch
@@ -0,0 +1,29 @@
+commit c1e172c2e14ef059dac632f7c67f081dfecd30dc
+Author: Simon Thelen <[email protected]>
+Date:   Tue Apr 3 14:41:33 2018 +0200
+
+    avcodec/imgconvert: fix possible null pointer dereference
+    
+    regression since 354b26a3945eadd4ed8fcd801dfefad2566241de
+    
+    (cherry picked from commit 8c2c97403baf95d0facb53f03e468f023eb943e1)
+
+diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
+index 7b0005b308..1fd636c83d 100644
+--- a/libavcodec/imgconvert.c
++++ b/libavcodec/imgconvert.c
+@@ -72,11 +72,12 @@ enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const 
enum AVPixelFormat *p
+     int loss;
+ 
+     for (i=0; pix_fmt_list[i] != AV_PIX_FMT_NONE; i++) {
+-        loss = *loss_ptr;
++        loss = loss_ptr ? *loss_ptr : 0;
+         best = avcodec_find_best_pix_fmt_of_2(best, pix_fmt_list[i], 
src_pix_fmt, has_alpha, &loss);
+     }
+ 
+-    *loss_ptr = loss;
++    if (loss_ptr)
++        *loss_ptr = loss;
+     return best;
+ }
+ 

Reply via email to