avcodec/pngenc: fix invalid read in sub filter.