Fix frame-decode errors.
** This PR is re-submission of PR (#3721) to fix rebase issue. **
This pull request is for both https://github.com/cisco/openh264/issues/3710 and https://github.com/cisco/openh264/issues/3713. I am not very sure that these are the correct fixes even though the frame decode errors are indeed resolved, so please review them. Especially for https://github.com/cisco/openh264/issues/3713.
@BenzhengZhang ping?
@tyan0 Is there a risk of regression?
I cannot say that there is never a risk of regression, however, as far as I tested (with many of my video archives and the test cases of which recently reported) I have not found any regression so far.
@tyan0 Is there a risk of regression?
At this point I guess it would be best to merge it to master to find out.
Fixed a bug reported in https://github.com/cisco/openh264/pull/3772