From 8b6166f1db18ffb322a5a634d6b6deaddb79ecbf Mon Sep 17 00:00:00 2001 From: kieran Date: Wed, 6 Nov 2024 15:47:54 +0000 Subject: [PATCH] fix: return stream on decoder flush --- src/decode.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/decode.rs b/src/decode.rs index 8f3cb27..2595cdd 100644 --- a/src/decode.rs +++ b/src/decode.rs @@ -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)