mirror of
https://github.com/v0l/zap-stream-core.git
synced 2025-06-20 10:47:02 +00:00
Configurable encoder pipeline
This commit is contained in:
11
src/utils.rs
Normal file
11
src/utils.rs
Normal file
@ -0,0 +1,11 @@
|
||||
use ffmpeg_sys_next::av_make_error_string;
|
||||
use std::ffi::CStr;
|
||||
|
||||
pub fn get_ffmpeg_error_msg(ret: libc::c_int) -> String {
|
||||
unsafe {
|
||||
const BUF_SIZE: usize = 512;
|
||||
let mut buf: [libc::c_char; BUF_SIZE] = [0; BUF_SIZE];
|
||||
av_make_error_string(buf.as_mut_ptr(), BUF_SIZE, ret);
|
||||
String::from(CStr::from_ptr(buf.as_ptr()).to_str().unwrap())
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user