Skip to content

Commit

Permalink
Replace some occurrences of i8 with c_char in CustomChannel to make c…
Browse files Browse the repository at this point in the history
…ompilation possible for arm platforms
  • Loading branch information
Petapton authored and kornelski committed Jan 4, 2025
1 parent 9e1086a commit 49fe516
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/util/channel_layout.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std::{array, ffi::CString, fmt, mem, ptr, slice};
use libc::c_char;

use crate::{
ffi::{AVChannel, AVChannelOrder, *},
Expand Down Expand Up @@ -449,10 +450,10 @@ impl CustomChannel {
let len = name.len().min(15);
name_with_zero[..len].copy_from_slice(&name[..len]);

Self::custom(channel as i32, array::from_fn(|i| name_with_zero[i] as i8))
Self::custom(channel as i32, array::from_fn(|i| name_with_zero[i] as c_char))
}

pub fn custom(channel: i32, name: [i8; 16]) -> Self {
pub fn custom(channel: i32, name: [c_char; 16]) -> Self {
assert_eq!(name[15], 0);

Self(AVChannelCustom {
Expand Down

0 comments on commit 49fe516

Please sign in to comment.