From d2e0febbbdffa297579aa9c89c7a9443b28e32f2ead9d1ddd13ba8ac9464433b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 7 Nov 2018 10:20:13 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/ffmpeg-4?expand=0&rev=31 --- ...libaom-fix-setting-amount-of-threads.patch | 51 ------------------- cve-2017-17555.diff | 19 ------- 2 files changed, 70 deletions(-) delete mode 100644 0001-avcodec-libaom-fix-setting-amount-of-threads.patch delete mode 100644 cve-2017-17555.diff diff --git a/0001-avcodec-libaom-fix-setting-amount-of-threads.patch b/0001-avcodec-libaom-fix-setting-amount-of-threads.patch deleted file mode 100644 index bcd82b3..0000000 --- a/0001-avcodec-libaom-fix-setting-amount-of-threads.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 309c3a0e81be553626711912e90015c26f4b09ba Mon Sep 17 00:00:00 2001 -From: James Almer -Date: Thu, 13 Sep 2018 13:26:00 -0300 -Subject: [PATCH] avcodec/libaom: fix setting amount of threads -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The libaom doxy says that a value of 0 for the threads fields is -equivalent to a value of 1, whereas for avctx->thread_count it means -the maximum amount of threads possible for the host system. - -Use av_cpu_count() to get the correct thread count when auto threads -is requested. - -Reviewed-by: Jan Ekström -Signed-off-by: James Almer ---- - libavcodec/libaomdec.c | 2 +- - libavcodec/libaomenc.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/libavcodec/libaomdec.c b/libavcodec/libaomdec.c -index 6a2de6d47a..2530c9f76b 100644 ---- a/libavcodec/libaomdec.c -+++ b/libavcodec/libaomdec.c -@@ -43,7 +43,7 @@ static av_cold int aom_init(AVCodecContext *avctx, - AV1DecodeContext *ctx = avctx->priv_data; - struct aom_codec_dec_cfg deccfg = { - /* token partitions+1 would be a decent choice */ -- .threads = FFMIN(avctx->thread_count, 16) -+ .threads = FFMIN(avctx->thread_count ? avctx->thread_count : av_cpu_count(), 16) - }; - - av_log(avctx, AV_LOG_INFO, "%s\n", aom_codec_version_str()); -diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c -index bbf4cf8b64..6a79d9b873 100644 ---- a/libavcodec/libaomenc.c -+++ b/libavcodec/libaomenc.c -@@ -319,7 +319,7 @@ static av_cold int aom_init(AVCodecContext *avctx, - enccfg.g_h = avctx->height; - enccfg.g_timebase.num = avctx->time_base.num; - enccfg.g_timebase.den = avctx->time_base.den; -- enccfg.g_threads = avctx->thread_count; -+ enccfg.g_threads = avctx->thread_count ? avctx->thread_count : av_cpu_count(); - - if (ctx->lag_in_frames >= 0) - enccfg.g_lag_in_frames = ctx->lag_in_frames; --- -2.18.0 - diff --git a/cve-2017-17555.diff b/cve-2017-17555.diff deleted file mode 100644 index 2624a83..0000000 --- a/cve-2017-17555.diff +++ /dev/null @@ -1,19 +0,0 @@ -From: Jan Engelhardt -Date: 2018-02-12 13:30:29.256158366 +0100 - -References: https://bugzilla.suse.com/show_bug.cgi?id=1072366 -References: CVE-2017-17555 - -Index: ffmpeg-4.0.1/libswresample/audioconvert.c -=================================================================== ---- ffmpeg-4.0.1.orig/libswresample/audioconvert.c 2018-04-20 12:02:58.000000000 +0200 -+++ ffmpeg-4.0.1/libswresample/audioconvert.c 2018-06-30 00:17:17.785924731 +0200 -@@ -239,7 +239,7 @@ int swri_audio_convert(AudioConvert *ctx - const uint8_t *pi= ich < 0 ? ctx->silence : in->ch[ich]; - uint8_t *po= out->ch[ch]; - uint8_t *end= po + os*len; -- if(!po) -+ if (!pi || !po) - continue; - ctx->conv_f(po+off*os, pi+off*is, is, os, end); - }