Closed msabansal closed 1 year ago
Thanks!
Ah, I forgot to mention. In your own interest, could you also submit a follow-up PR containing a test case and a minimal .h264 file triggering the issue?
It's not strictly necessary, but otherwise there is a risk for that logic to accidentally get refactored out at some point.
@ralfbiedert thanks for merging. I was unsure of a test on this. The file decodes without any error without this code. Only that output has artifacts and that too on subsequent call to decode.
Unclear if I should add something that compares output to an image
For now added a simple test to validate fame is decoded properly https://github.com/ralfbiedert/openh264-rust/pull/22
In a local test environment i have an h264 stream that returns 0 on the first call to decode_frame_no_delay and iBufferStatus != 0.
In this case we should check the numbers of frames remaining in buffer (0 or 1) and flush the buffer if it is 1.