rpza: switch to bytestream2
rpza: use fixed-width int types
rpza: move some variables to the blocks where they are used
rpza: limit the number of blocks to the total remaining blocks in the frame

Fixes invalid writes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
g2meet: factor out seeking to the chunk end

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
g2meet: make JPEG tile decoder operate on 8x8 block mask

This is needed for upcoming Go2Meeting (G2M2/G2M3) decoder.
lavc: set AVFrame pkt_pts and reordered_opaque in reget_buffer

Signed-off-by: Anton Khirnov <anton@khirnov.net>