fix: return stream on decoder flush

This commit is contained in:
kieran 2024-11-06 15:47:54 +00:00
parent e8ae73f3a8
commit 8b6166f1db
No known key found for this signature in database
GPG Key ID: DE71CEB3925BE941

View File

@ -18,6 +18,7 @@ use log::debug;
pub struct DecoderCodecContext {
pub context: *mut AVCodecContext,
pub codec: *const AVCodec,
pub stream: *mut AVStream,
pub hw_config: *const AVCodecHWConfig,
}
@ -200,6 +201,7 @@ impl Decoder {
Ok(e.insert(DecoderCodecContext {
context,
codec,
stream,
hw_config,
}))
} else {
@ -214,7 +216,7 @@ impl Decoder {
pkgs.extend(Self::decode_pkt_internal(
ctx.context,
ptr::null_mut(),
ptr::null_mut(),
ctx.stream,
)?);
}
Ok(pkgs)