Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/encoder/resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ pub(crate) fn get_video_format(pixel_format: PixelFormat, bit_depth: BitDepth) -

/// Create a codec name array for Vulkan from a string.
///
/// This creates a null-terminated i8 array of 256 bytes for use with Vulkan
/// This creates a null-terminated c_char array of 256 bytes for use with Vulkan
/// video extensions.
pub(crate) fn make_codec_name(codec_name: &[u8]) -> [i8; 256] {
let mut name = [0i8; 256];
pub(crate) fn make_codec_name(codec_name: &[u8]) -> [std::ffi::c_char; 256] {
let mut name = [0 as std::ffi::c_char; 256];
for (i, &byte) in codec_name.iter().enumerate() {
if i < 255 {
name[i] = byte as i8;
name[i] = byte as std::ffi::c_char;
}
}
name
Expand Down
2 changes: 1 addition & 1 deletion src/vulkan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ impl VideoContext {
extension_names.push(ash::ext::image_drm_format_modifier::NAME.as_ptr());
}

let mut push_ext = |name: *const i8| {
let mut push_ext = |name: *const std::ffi::c_char| {
if !extension_names.contains(&name) {
extension_names.push(name);
}
Expand Down
Loading