Skip to content

Commit

Permalink
+) Add vulkan patch for segmentation fault error
Browse files Browse the repository at this point in the history
  • Loading branch information
grill2010 committed Apr 24, 2024
1 parent 9a64c8a commit b4ce61d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions ffmpeg/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig/
patch -Np1 -d $LAME < ../../lame.patch
patch -Np1 -d $OPENSSL < ../../openssl-android.patch
patch -Np1 -d ffmpeg-$FFMPEG_VERSION < ../../ffmpeg.patch
patch -Np1 -d ffmpeg-$FFMPEG_VERSION < ../../vulkan.patch
# patch -Np1 -d ffmpeg-$FFMPEG_VERSION < ../../ffmpeg-flv-support-hevc-opus.patch
sedinplace 's/bool bEnableavx512/bool bEnableavx512 = false/g' x265-*/source/common/param.h
sedinplace 's/detect512()/false/g' x265-*/source/common/quant.cpp
Expand Down
14 changes: 14 additions & 0 deletions ffmpeg/vulkan.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c
index 67b9526255..e3c0c4c24a 100644
--- a/libavutil/vulkan.c
+++ b/libavutil/vulkan.c
@@ -605,6 +605,9 @@ int ff_vk_exec_add_dep_frame(FFVulkanContext *s, FFVkExecContext *e, AVFrame *f,
VkImageLayout *layout_dst;
uint32_t *queue_family_dst;
VkAccessFlagBits *access_dst;

+ if (!f || !f->hw_frames_ctx)
+ return 1;
+
AVHWFramesContext *hwfc = (AVHWFramesContext *)f->hw_frames_ctx->data;
AVVulkanFramesContext *vkfc = hwfc->hwctx;

0 comments on commit b4ce61d

Please sign in to comment.