ralfbiedert / openh264-rs

Idiomatic Rust wrappers around OpenH264.
69 stars 35 forks source link

test on stable and nightly rust, and multiple OSes #18

Closed astraw closed 2 years ago

ralfbiedert commented 2 years ago

I just did some testing on my Linux machine, but the behavior is basically the same, it fails on +nightly in here

#[test]
fn can_decode_multi_by_step() -> Result<(), Error> {
    let src = &include_bytes!("data/multi_512x512.h264")[..];

    let config = DecoderConfig::default().debug(false);
    let mut decoder = Decoder::with_config(config)?;

    for packet in nal_units(src) {
        decoder.decode(packet)?; // <--- Commenting this line out makes this test pass.
    }

    Ok(())
}

Error:

---- can_decode_multi_by_step stdout ----
thread 'can_decode_multi_by_step' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `0`: the test returned a termination value with a non-zero status code (1) which indicates a failure', /rustc/95a992a68694d8bf3959bd2c0ac27ce9e9208b59/library/test/src/lib.rs:184:5
stack backtrace:
   0: rust_begin_unwind
             at /rustc/95a992a68694d8bf3959bd2c0ac27ce9e9208b59/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/95a992a68694d8bf3959bd2c0ac27ce9e9208b59/library/core/src/panicking.rs:142:14
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
             at /rustc/95a992a68694d8bf3959bd2c0ac27ce9e9208b59/library/core/src/panicking.rs:181:5
   4: test::assert_test_result
             at /rustc/95a992a68694d8bf3959bd2c0ac27ce9e9208b59/library/test/src/lib.rs:184:5
   5: decode::can_decode_multi_by_step::{{closure}}
             at ./tests/decode.rs:64:1
   6: core::ops::function::FnOnce::call_once
             at /rustc/95a992a68694d8bf3959bd2c0ac27ce9e9208b59/library/core/src/ops/function.rs:248:5
   7: core::ops::function::FnOnce::call_once
             at /rustc/95a992a68694d8bf3959bd2c0ac27ce9e9208b59/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Don't have immediate way forward right now. Will merge this as-is, and make a new release. Please ping if you find out anything more.

astraw commented 2 years ago

Thanks for checking also. I have one more patch I will try to send soon and then a release would be most appreciated. Thanks for your immediate help on all this.

ralfbiedert commented 2 years ago

Created issue #19 for this problem.

ralfbiedert commented 2 years ago

Ok will wait for next patch before release.