]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_avgblur_vulkan.c
avfilter: Constify all AVFilters
[ffmpeg] / libavfilter / vf_avgblur_vulkan.c
index 12d57e0875619ffc109194478349caf66b46eec7..1e485061cd68f5c6fcd154a1c494acb4e93890f3 100644 (file)
@@ -16,6 +16,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/random_seed.h"
 #include "libavutil/opt.h"
 #include "vulkan.h"
 #include "internal.h"
@@ -99,7 +100,7 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in)
 
     s->vkctx.queue_family_idx = s->vkctx.hwctx->queue_family_comp_index;
     s->vkctx.queue_count = GET_QUEUE_COUNT(s->vkctx.hwctx, 0, 1, 0);
-    s->vkctx.cur_queue_idx = rand() % s->vkctx.queue_count;
+    s->vkctx.cur_queue_idx = av_get_random_seed() % s->vkctx.queue_count;
 
     { /* Create shader for the horizontal pass */
         desc_i[0].updater = s->input_images;
@@ -397,7 +398,7 @@ static const AVFilterPad avgblur_vulkan_outputs[] = {
     { NULL }
 };
 
-AVFilter ff_vf_avgblur_vulkan = {
+const AVFilter ff_vf_avgblur_vulkan = {
     .name           = "avgblur_vulkan",
     .description    = NULL_IF_CONFIG_SMALL("Apply avgblur mask to input video"),
     .priv_size      = sizeof(AvgBlurVulkanContext),