forked from pool/ffmpeg-6
avcodec/decode: clean-up if get_hw_frames_parameters fails (ffmpeg#11013, vlc#28811)
Signed-off-by: Olaf Hering <olaf@aepfle.de>
This commit is contained in:
parent
703dad69e8
commit
75e90aafe0
@ -0,0 +1,27 @@
|
||||
From: François Cartegnie <fcvlcdev@free.fr>
|
||||
Date: Mon, 13 May 2024 11:37:27 +0000
|
||||
Subject: avcodec/decode: clean-up if get_hw_frames_parameters fails
|
||||
|
||||
https://trac.ffmpeg.org/ticket/11013
|
||||
https://code.videolan.org/videolan/vlc/-/issues/28811
|
||||
|
||||
Fixes the following assert:
|
||||
|
||||
[00007f1df83d17e0] vaapi generic error: avcodec_get_hw_frames_parameters failed: -22
|
||||
Assertion p_dst->hwaccel_threadsafe || (!dst->hwaccel && !dst->internal->hwaccel_priv_data) failed at libavcodec/pthread_frame.c:349
|
||||
|
||||
Reproduced from VLC with VAAPI, when fallbacking from hw to sw.
|
||||
|
||||
--- a/libavcodec/pthread_frame.c
|
||||
+++ b/libavcodec/pthread_frame.c
|
||||
@@ -344,6 +344,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
return err;
|
||||
}
|
||||
|
||||
+ // hwaccel could have failed init due to some params
|
||||
+ if(!dst->hwaccel && dst->internal->hwaccel_priv_data)
|
||||
+ ff_hwaccel_uninit(dst);
|
||||
+
|
||||
// reset dst hwaccel state if needed
|
||||
av_assert0(p_dst->hwaccel_threadsafe ||
|
||||
(!dst->hwaccel && !dst->internal->hwaccel_priv_data));
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 30 12:34:56 UTC 2024 - olaf@aepfle.de
|
||||
|
||||
- Fix assertion due to missing priv_data cleanup on failed VAAPI
|
||||
acceleration with 11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch
|
||||
(ffmpeg#11013, vlc#28811)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 26 10:02:20 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
|
||||
|
||||
|
@ -116,6 +116,7 @@ Patch11: 0001-avfilter-af_dialoguenhance-do-output-scaling-once.patch
|
||||
Patch12: 0001-avutil-hwcontext-Don-t-assume-frames_uninit-is-reent.patch
|
||||
Patch13: 0001-avfilter-vf_codecview-fix-heap-buffer-overflow.patch
|
||||
Patch14: 0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch
|
||||
Patch15: 11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch
|
||||
Patch90: ffmpeg-chromium.patch
|
||||
Patch91: ffmpeg-dlopen-openh264.patch
|
||||
Patch92: ffmpeg-CVE-2023-50007.patch
|
||||
@ -839,6 +840,7 @@ Patch11: 0001-avfilter-af_dialoguenhance-do-output-scaling-once.patch
|
||||
Patch12: 0001-avutil-hwcontext-Don-t-assume-frames_uninit-is-reent.patch
|
||||
Patch13: 0001-avfilter-vf_codecview-fix-heap-buffer-overflow.patch
|
||||
Patch14: 0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch
|
||||
Patch15: 11013-avcodec-decode-clean-up-if-get_hw_frames_parameters-.patch
|
||||
Patch90: ffmpeg-chromium.patch
|
||||
Patch91: ffmpeg-dlopen-openh264.patch
|
||||
Patch92: ffmpeg-CVE-2023-50007.patch
|
||||
|
Loading…
Reference in New Issue
Block a user