From e724bdfffbd3c27aac53d1f32f20f105f37caef0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 24 Oct 2017 00:28:03 +0200 Subject: [PATCH 1/2] lavc: fix hw_device_ctx operation Commit b46a77f19d accidentally broke this (requested change that was added to the patch later and which was not fully tested). Signed-off-by: Mark Thompson --- libavcodec/decode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 54cda530bb..27f75d73e3 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -698,11 +698,9 @@ int ff_decode_get_hw_frames_ctx(AVCodecContext *avctx, ret = avcodec_get_hw_frames_parameters(avctx, avctx->hw_device_ctx, avctx->hwaccel->pix_fmt, - avctx->hw_frames_ctx); - if (ret < 0) { - av_buffer_unref(&avctx->hw_frames_ctx); + &avctx->hw_frames_ctx); + if (ret < 0) return ret; - } frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; From 17f5171cd4753e7f50e6d95df069bccbc90265bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 23 Oct 2017 10:44:07 +0300 Subject: [PATCH 2/2] arm: Check for have_vfp_vm instead of !have_vfpv3 for float_dsp_vfp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was missed in e2710e790c0 since those functions weren't exercised by checkasm. Signed-off-by: Martin Storsjö --- libavutil/arm/float_dsp_init_vfp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/arm/float_dsp_init_vfp.c b/libavutil/arm/float_dsp_init_vfp.c index 61ff2ed38e..79ba6ecd3d 100644 --- a/libavutil/arm/float_dsp_init_vfp.c +++ b/libavutil/arm/float_dsp_init_vfp.c @@ -36,11 +36,11 @@ void ff_butterflies_float_vfp(float *restrict v1, float *restrict v2, int len); av_cold void ff_float_dsp_init_vfp(AVFloatDSPContext *fdsp, int cpu_flags) { - if (!have_vfpv3(cpu_flags)) { + if (have_vfp_vm(cpu_flags)) { fdsp->vector_fmul = ff_vector_fmul_vfp; fdsp->vector_fmul_window = ff_vector_fmul_window_vfp; } fdsp->vector_fmul_reverse = ff_vector_fmul_reverse_vfp; - if (!have_vfpv3(cpu_flags)) + if (have_vfp_vm(cpu_flags)) fdsp->butterflies_float = ff_butterflies_float_vfp; }