Closed matsondawson closed 2 years ago
I've confirmed this now. You're missing a few macroblocks every few seconds. I can see the last few bits in the buffer being skipped. It doesn't cause decoding issues as the file from that point on is still valid. But it is probably causing minor rendering corruption.
This seems to fix it, but I don't really understand the code enough to say it's correct.
Lol. It appears you've already fixed this. Closing
When looping to decode macroblocks you call plm_buffer_no_start_code, which is an aligned check for no start code. I think this can lose undecoded bits in the stream. In the spec it seems they do an unaligned bitcheck for 23 0's. I believe if there were no more macroblocks and the stream wasn't aligned it would be padded with 0's. What do you think?