fix: fail on hw frame

This commit is contained in:
2024-11-06 10:07:28 +00:00
parent f37b399faa
commit f900d96340
4 changed files with 21 additions and 5 deletions

View File

@ -54,6 +54,9 @@ impl Resample {
}
pub unsafe fn process_frame(&mut self, frame: *mut AVFrame) -> Result<*mut AVFrame, Error> {
if !(*frame).hw_frames_ctx.is_null() {
anyhow::bail!("Hardware frames are not supported in this software re-sampler");
}
self.setup_swr(frame)?;
let mut out_frame = av_frame_alloc();