Open AndrewJDR opened 9 years ago
I am fairly sure this is a bug with the frame size in the H.264 headers as written by the encoder. It can use 2, 3 or 4 bytes. x264 uses 4 always. I think openh264enc uses 2 always as written, so it overflows if the frame gets too large, which is precisely the case snow would trigger.
When test_client is a peer connecting to Firefox, high motion video will cause the H264 encoder element or parser (I'm not sure which is at fault) to fail with the following messages:
Here is a patch against test_client to reproduce this issue using a videotestsrc with either "pattern=snow" or "pattern=zone-plate kx2=20 ky2=20 kt=1": https://gist.githubusercontent.com/ajohnson23/bff7d086f7c6477db707/raw/e01646617342513b32a70ca68a1f6e29f70b8a3f/openwebrtc-h264-high-motion-failurecase.patch
To reproduce:
This is not a "pattern=snow" only problem -- it happens in a lot of other situations when there is high-motion. This was just the easiest test case I could come up with to show the issue.
A few notes: