Don't panic on OOM
This commit is contained in:
parent
f0903fb69b
commit
50e1ccaca4
@ -77,7 +77,7 @@ impl Output {
|
||||
let ptr = avformat_new_stream(self.as_mut_ptr(), codec);
|
||||
|
||||
if ptr.is_null() {
|
||||
panic!("out of memory");
|
||||
return Err(Error::Unknown);
|
||||
}
|
||||
|
||||
let index = (*self.ctx.as_ptr()).nb_streams - 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user