diff --git a/src/gallium/drivers/radeonsi/radeon_video.c b/src/gallium/drivers/radeonsi/radeon_video.c index 1952897cb84..fe402b99a9a 100644 --- a/src/gallium/drivers/radeonsi/radeon_video.c +++ b/src/gallium/drivers/radeonsi/radeon_video.c @@ -14,19 +14,17 @@ #include "util/u_video.h" #include "vl/vl_defines.h" #include "vl/vl_video_buffer.h" +#include "ac_uvd_dec.h" #include /* generate an stream handle */ unsigned si_vid_alloc_stream_handle() { - static unsigned counter = 0; - static unsigned handle_base = 0; - - if (!handle_base) - handle_base = util_bitreverse(getpid() ^ os_time_get()); - - return handle_base ^ ++counter; + static struct ac_uvd_stream_handle stream_handle; + if (!stream_handle.base) + ac_uvd_init_stream_handle(&stream_handle); + return ac_uvd_alloc_stream_handle(&stream_handle); } /* create a buffer in the winsys */