]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_chromaber_vulkan.c
avcodec/mjpegdec: fix SOF check in EOI
[ffmpeg] / libavfilter / vf_chromaber_vulkan.c
index 1bee5e10f8a16be77bae11efdefbebd6517f0d5c..2f5bf7bbb9d99f07995398233bb8234a859ce261 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"
@@ -75,7 +76,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;
 
     s->pl = ff_vk_create_pipeline(ctx);
     if (!s->pl)
@@ -332,7 +333,7 @@ static const AVFilterPad chromaber_vulkan_outputs[] = {
     { NULL }
 };
 
-AVFilter ff_vf_chromaber_vulkan = {
+const AVFilter ff_vf_chromaber_vulkan = {
     .name           = "chromaber_vulkan",
     .description    = NULL_IF_CONFIG_SMALL("Offset chroma of input video (chromatic aberration)"),
     .priv_size      = sizeof(ChromaticAberrationVulkanContext),