[FFmpeg-cvslog] fftools/ffplay: fix crash when vk renderer is null
ffmpeg | branch: release/7.1 | Leandro Santiago | Thu Oct 31 21:50:45 2024 +0100| [367b7b546f0e012eadcbcf88fe28c6ebf8d16d8e] | committer: Zhao Zhili fftools/ffplay: fix crash when vk renderer is null 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 Signed-off-by: Zhao Zhili (cherry picked from commit fd0cacc4720c68c58f86e41153444252dbd4e5b6) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=367b7b546f0e012eadcbcf88fe28c6ebf8d16d8e --- fftools/ffplay.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 60d8874eab..96b0b614b9 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -2607,6 +2607,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"); +return AVERROR(ENOTSUP); +} + ret = vk_renderer_get_hw_dev(vk_renderer, &vk_dev); if (ret < 0) return ret; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] fftools/ffplay: fix crash when vk renderer is null
ffmpeg | branch: release/7.0 | Leandro Santiago | Thu Oct 31 21:50:45 2024 +0100| [786d4af40504eaaa71a18f73e2fb237fdf84be20] | committer: Zhao Zhili fftools/ffplay: fix crash when vk renderer is null 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 Signed-off-by: Zhao Zhili (cherry picked from commit fd0cacc4720c68c58f86e41153444252dbd4e5b6) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=786d4af40504eaaa71a18f73e2fb237fdf84be20 --- fftools/ffplay.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 048a4a8704..3e1be8038c 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -2605,6 +2605,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"); +return AVERROR(ENOTSUP); +} + ret = vk_renderer_get_hw_dev(vk_renderer, &vk_dev); if (ret < 0) return ret; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] fftools/ffplay: fix crash when vk renderer is null
ffmpeg | branch: master | Leandro Santiago | Thu Oct 31 21:50:45 2024 +0100| [fd0cacc4720c68c58f86e41153444252dbd4e5b6] | committer: Zhao Zhili fftools/ffplay: fix crash when vk renderer is null 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 Signed-off-by: Zhao Zhili > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fd0cacc4720c68c58f86e41153444252dbd4e5b6 --- fftools/ffplay.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index a596972769..2a572fc3aa 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"); +return AVERROR(ENOTSUP); +} + ret = vk_renderer_get_hw_dev(vk_renderer, &vk_dev); if (ret < 0) return ret; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".