File tree 1 file changed +9
-2
lines changed
video/external/src/decoder
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -293,15 +293,22 @@ impl VideoDecoder for H264Decoder {
293
293
//in-out: for Decoding only: declare and initialize the output buffer info
294
294
let mut dest_buf_info: openh264_sys:: SBufferInfo = std:: mem:: zeroed ( ) ;
295
295
296
- let _ret = decoder_vtbl. DecodeFrameNoDelay . unwrap ( ) (
296
+ let ret = decoder_vtbl. DecodeFrameNoDelay . unwrap ( ) (
297
297
self . decoder ,
298
298
buffer. as_mut_ptr ( ) ,
299
299
buffer. len ( ) as c_int ,
300
300
output. as_mut_ptr ( ) ,
301
301
& mut dest_buf_info as * mut openh264_sys:: SBufferInfo ,
302
302
) ;
303
+
304
+ if ret == 0 {
305
+ Ok ( ( ) )
306
+ } else {
307
+ Err ( Error :: DecoderError (
308
+ format ! ( "Configuration failed with status code: {}" , ret) . into ( ) ,
309
+ ) )
310
+ }
303
311
}
304
- Ok ( ( ) )
305
312
}
306
313
307
314
fn preload_frame ( & mut self , encoded_frame : EncodedFrame < ' _ > ) -> Result < FrameDependency , Error > {
You can’t perform that action at this time.
0 commit comments