libfreerdp-codec: simplify block reading logic