[FFmpeg-devel] [PATCH] fftools/ffplay: fix crash when vk renderer is null
Michael Niedermayer
michael at niedermayer.cc
Thu Oct 31 20:18:24 EET 2024
On Thu, Oct 31, 2024 at 02:40:57PM +0100, Leandro Santiago wrote:
> When vulkan rendering is requested by the user and fails, ffplay should
> exit graciously instead of crash due to a null pointer deref.
>
> Signed-off-by: Leandro Santiago <leandrosansilva at gmail.com>
> ---
> fftools/ffplay.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/fftools/ffplay.c b/fftools/ffplay.c
> index a596972769..56d0a36ca1 100644
> --- a/fftools/ffplay.c
> +++ b/fftools/ffplay.c
> @@ -2612,6 +2612,11 @@ static int create_hwaccel(AVBufferRef **device_ctx)
> if (type == AV_HWDEVICE_TYPE_NONE)
> return AVERROR(ENOTSUP);
> + if (!vk_renderer) {
> + av_log(NULL, AV_LOG_ERROR, "Vulkan renderer is not available\n");
there is something wrong with this patch
the "+" shouldnt be in teh 2nd column
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
"Nothing to hide" only works if the folks in power share the values of
you and everyone you know entirely and always will -- Tom Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241031/11f7e4eb/attachment.sig>
More information about the ffmpeg-devel
mailing list